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:37:10 +0000 (09:37 +0100) | ||
commit | 168ba3c10031a91771b2c31a42a50d7315780edc | |
tree | bda783fe47cb0f4a35905da62b2aca64f5f9ceee | tree | snapshot |
parent | e7474a34d1a1ac59497796b8decd3d64c35f5a6a | 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 |