projects
/
collection4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8b8d15
)
src/utils_array.c: Fix a segfault in "array_prepend".
author
Florian Forster
<ff@octo.it>
Fri, 2 Jul 2010 18:27:51 +0000
(20:27 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Fri, 2 Jul 2010 18:27:51 +0000
(20:27 +0200)
src/utils_array.c
patch
|
blob
|
history
diff --git
a/src/utils_array.c
b/src/utils_array.c
index
93e3568
..
0cc0bd7
100644
(file)
--- a/
src/utils_array.c
+++ b/
src/utils_array.c
@@
-104,7
+104,7
@@
int array_prepend (str_array_t *a, const char *entry) /* {{{ */
}
a->ptr = ptr;
- memmove (a->ptr
, a->ptr + 1
, sizeof (*a->ptr) * a->size);
+ memmove (a->ptr
+ 1, a->ptr
, sizeof (*a->ptr) * a->size);
a->ptr[0] = cpy;
a->size++;