diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-10-25 11:43:30 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-10-25 11:43:30 +0000 |
commit | 88bb44a51e350c9749323242482dc5e944697d8f (patch) | |
tree | a19835aec094d07536c6def639d5d5d236f0a1cd /epan/dissectors/packet-rtsp.c | |
parent | 337896f4c6777bc0b84a2e017ebcbb52100a312b (diff) |
From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164
svn path=/trunk/; revision=30691
Diffstat (limited to 'epan/dissectors/packet-rtsp.c')
-rw-r--r-- | epan/dissectors/packet-rtsp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rtsp.c b/epan/dissectors/packet-rtsp.c index 092f25d945..f040549e84 100644 --- a/epan/dissectors/packet-rtsp.c +++ b/epan/dissectors/packet-rtsp.c @@ -1129,9 +1129,7 @@ process_rtsp_request(tvbuff_t *tvb, int offset, const guchar *data, while (url < lineend && !isspace(*url)) url++; /* Create a URL-sized buffer and copy contents */ - tmp_url = ep_alloc(url - url_start + 1); - memcpy(tmp_url, url_start, url - url_start); - tmp_url[url - url_start] = '\0'; + tmp_url = ep_strndup(url_start, url - url_start); /* Add URL to tree */ proto_tree_add_string(sub_tree, hf_rtsp_url, tvb, |