git.samba.org
/
obnox
/
wireshark
/
wip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
More rewrite of prohibited APIs (sprintf, strcpy, strcat).
[obnox/wireshark/wip.git]
/
tap-camelsrt.c
diff --git
a/tap-camelsrt.c
b/tap-camelsrt.c
index 19bfbabc448324aea89e3c537bb86c05261ce759..a16635197ec3c992c6e71e6d50b5c6f42b6c12c9 100644
(file)
--- a/
tap-camelsrt.c
+++ b/
tap-camelsrt.c
@@
-222,8
+222,7
@@
static void camelsrt_init(const char *optarg, void* userdata _U_)
p_camelsrt = g_malloc(sizeof(struct camelsrt_t));
if(filter){
- p_camelsrt->filter=g_malloc(strlen(filter)+1);
- strcpy(p_camelsrt->filter,filter);
+ p_camelsrt->filter=g_strdup(filter);
} else {
p_camelsrt->filter=NULL;
}