projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
use snprintf, strdup, ... where possible to make for safer operation -- Martin Pelikan
[rrdtool.git]
/
src
/
rrd_client.c
diff --git
a/src/rrd_client.c
b/src/rrd_client.c
index
3347b82
..
f271f3d
100644
(file)
--- a/
src/rrd_client.c
+++ b/
src/rrd_client.c
@@
-913,8
+913,7
@@
rrd_info_t * rrdc_info (const char *filename) /* {{{ */
break;
case RD_I_STR:
chomp(s);
- info.u_str = (char*)malloc(sizeof(char) * (strlen(s) + 1));
- strcpy(info.u_str,s);
+ info.u_str = strdup(s);
break;
case RD_I_BLO:
rrd_set_error ("rrdc_info: BLOB objects are not supported");