author | Andres J. Diaz <ajdiaz@connectical.com> | |
Tue, 1 Mar 2011 16:25:21 +0000 (17:25 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 8 Mar 2011 08:42:44 +0000 (09:42 +0100) | ||
commit | 414723eda704326d47c203bcacfcb1bdc51eb784 | |
tree | 4b45d5b2b05753947f259b46ad2070ded1bf6223 | tree | snapshot |
parent | 4dc9287f4de0283ae986444377075dcbdada2871 | commit | diff |
Fix buffer length in parse_identifier_vl function.
In parse_identifier_vl function (common.c), the value passed to
sstrncpy as buffer length is the sizeof a char pointer, which
is 4bytes for 32bit arch and 8bytes for 64 bit ones.
This patch fix the length and truncate the buffer to the same size as
destination buffer.
Signed-off-by: Andres J. Diaz <ajdiaz@connectical.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
In parse_identifier_vl function (common.c), the value passed to
sstrncpy as buffer length is the sizeof a char pointer, which
is 4bytes for 32bit arch and 8bytes for 64 bit ones.
This patch fix the length and truncate the buffer to the same size as
destination buffer.
Signed-off-by: Andres J. Diaz <ajdiaz@connectical.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/common.c | diff | blob | history |