projects
/
platform
/
upstream
/
gcr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68e6f16
)
Don't allow allocating zero bytes.
author
Stefan Walter
<stefw@src.gnome.org>
Fri, 13 Feb 2009 18:32:41 +0000
(18:32 +0000)
committer
Stefan Walter
<stefw@src.gnome.org>
Fri, 13 Feb 2009 18:32:41 +0000
(18:32 +0000)
svn path=/trunk/; revision=1564
egg/egg-secure-memory.c
patch
|
blob
|
history
diff --git
a/egg/egg-secure-memory.c
b/egg/egg-secure-memory.c
index
eb8a498
..
d2d18d7
100644
(file)
--- a/
egg/egg-secure-memory.c
+++ b/
egg/egg-secure-memory.c
@@
-790,6
+790,10
@@
egg_secure_alloc_full (size_t length, int flags)
return NULL;
}
+ /* Can't allocate zero bytes */
+ if (length == 0)
+ return NULL;
+
DO_LOCK ();
for (block = all_blocks; block; block = block->next) {