From 6f9586ddc43644837f3ef6a190b3027b26e5eeeb Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sat, 13 Sep 2003 21:35:24 +0000 Subject: [PATCH] Change use of strncpy in parsedb to memcpy. --- ChangeLog | 4 ++++ debian/changelog | 1 + lib/parse.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8b714f41..9c7cc3a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Sep 13 16:34:53 CDT 2003 Adam Heath + + * lib/parse.c: Change use of strncpy in parsedb to memcpy. + Sat Sep 13 16:28:52 CDT 2003 Adam Heath * main/main.c: Fix segfault with --status-fd. diff --git a/debian/changelog b/debian/changelog index f9301fa3..905973f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ dpkg (1.10.11) unstable; urgency=low * Add build-depends on sgml-base, and increase gettext build-depends to 0.12.1-3. * Updated config.sub and config.guess in cvs. + * Change use of strncpy in parsedb to memcpy. Closes: #160447 * Frank Lichtenheld : Apply patch, to handle missing infodir.bak, and empty files. Closes: #196361 diff --git a/lib/parse.c b/lib/parse.c index 11165f44..d0543403 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -199,7 +199,7 @@ int parsedb(const char *filename, enum parsedbflags flags, fip++, ip++); if (fip->name) { value= realloc(value,valuelen+1); - strncpy(value,valuestart,valuelen); + memcpy(value,valuestart,valuelen); *(value+valuelen)= 0; if (*ip++) parseerr(NULL,filename,lno, warnto,warncount,&newpig,0, -- 2.39.5