diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-04-01 10:18:22 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-04-01 10:18:22 +0000 |
commit | ff3922238b4258eb2f9f9458589d3cecd177f7bc (patch) | |
tree | 02bf8e1cc6c31556faae673fc7dd7e4c564af439 /src/sdp.c | |
parent | 66e912c137f52fcac7eab1a7d0d9da65b975b2cc (diff) |
Store additional unitSize for strings
Diffstat (limited to 'src/sdp.c')
-rw-r--r-- | src/sdp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -810,14 +810,15 @@ static sdp_data_t *extract_str(const void *p, int *len) return 0; } - s = (char *)malloc(n + 1); + s = malloc(n + 1); memset(s, 0, n + 1); - strncpy(s, p, n); + memcpy(s, p, n); SDPDBG("Len : %d\n", n); SDPDBG("Str : %s\n", s); d->val.str = s; + d->unitSize = n; return d; } |