Fix one byte too short malloc.
* src/engine-spawn.c (add_data): Fix malloc -- Bummer. Why did I subtracted one from the size? Did I assume a dynamically allocated structure with a string field which was not going to be used? Very strange. Not a real problem though because malloc will anyway round up the allocation to at least the next word size. Detected by Stack 0.3.
This commit is contained in:
parent
428ea76965
commit
119f27032b
@ -120,7 +120,7 @@ add_data (engine_spawn_t esp, gpgme_data_t data, int dup_to, int inbound)
|
|||||||
assert (esp);
|
assert (esp);
|
||||||
assert (data);
|
assert (data);
|
||||||
|
|
||||||
a = malloc (sizeof *a - 1);
|
a = malloc (sizeof *a);
|
||||||
if (!a)
|
if (!a)
|
||||||
return gpg_error_from_syserror ();
|
return gpg_error_from_syserror ();
|
||||||
a->next = NULL;
|
a->next = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user