pike.git/
src/
stralloc.c
Branch:
Tag:
Non-build tags
All tags
No tags
2016-01-09
2016-01-09 22:39:59 by Martin Nilsson <nilsson@fastmail.com>
b3ec732d9cc0c8c03ce98836a820d1deabc49ad6 (
5
lines) (+
3
/-
2
)
[
Show
|
Annotate
]
Branch:
8.1
No need to copy null from the original string, as a new null character will be inserted.
1587:
{ char * s = NULL; size_t nbytes = (size_t)(size+1) << a->size_shift;
-
size_t obytes = (size_t)
(
a->
len+1)
<< a->size_shift;
+
size_t obytes = (size_t)a->
len
<< a->size_shift;
if( size < a->len && size-a->len<(signed)sizeof(void*) ) goto done;