summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-04-01 10:18:22 +0000
committerMarcel Holtmann <marcel@holtmann.org>2004-04-01 10:18:22 +0000
commitff3922238b4258eb2f9f9458589d3cecd177f7bc (patch)
tree02bf8e1cc6c31556faae673fc7dd7e4c564af439 /src
parent66e912c137f52fcac7eab1a7d0d9da65b975b2cc (diff)
Store additional unitSize for strings
Diffstat (limited to 'src')
-rw-r--r--src/sdp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sdp.c b/src/sdp.c
index b793f64f..0fec56f7 100644
--- a/src/sdp.c
+++ b/src/sdp.c
@@ -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;
}