Package: nickle
Version: 2.70-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu precise ubuntu-patch
Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
Nickle was crashing because eglibc's strcpy was aborting when the
destination string was 0-length. (This check is enabled by
-D_FORTIFY_SOURCE=2).
The recommended fix for such errors is to use strncpy instead of strcpy.
The attached patch makes that change; thanks for considering it.
This is Ubuntu bug https://launchpad.net/bugs/721636
-- System Information:
Debian Release: wheezy/sid
APT prefers precise-updates
APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise')
Architecture: i386 (i686)
Kernel: Linux 3.1.0-2-generic-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- nickle-2.70.orig/string.c
+++ nickle-2.70/string.c
@@ -246,7 +246,7 @@
Value ret;
ret = NewString (strlen (str));
- strcpy (StringChars (&ret->string), str);
+ strncpy (StringChars (&ret->string), str, ret->string.length);
RETURN (ret);
}