diff options
author | Chet Ramey <chet.ramey@case.edu> | 2014-02-26 09:36:43 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2014-02-26 09:36:43 -0500 |
commit | ac50fbac377e32b98d2de396f016ea81e8ee9961 (patch) | |
tree | f71882366b98fedf1a88a063103219a4935de926 /lib/sh/fmtulong.c | |
parent | 4539d736f1aff232857a854fd2a68df0c98d9f34 (diff) | |
download | android_external_bash-ac50fbac377e32b98d2de396f016ea81e8ee9961.tar.gz android_external_bash-ac50fbac377e32b98d2de396f016ea81e8ee9961.tar.bz2 android_external_bash-ac50fbac377e32b98d2de396f016ea81e8ee9961.zip |
Bash-4.3 distribution sources and documentation
Diffstat (limited to 'lib/sh/fmtulong.c')
-rw-r--r-- | lib/sh/fmtulong.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sh/fmtulong.c b/lib/sh/fmtulong.c index 214b146..0ccc22b 100644 --- a/lib/sh/fmtulong.c +++ b/lib/sh/fmtulong.c @@ -1,6 +1,6 @@ /* fmtulong.c -- Convert unsigned long int to string. */ -/* Copyright (C) 1998-2002 Free Software Foundation, Inc. +/* Copyright (C) 1998-2011 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -98,8 +98,9 @@ fmtulong (ui, base, buf, len, flags) if (base < 2 || base > 64) { #if 1 + /* XXX - truncation possible with long translation */ strncpy (buf, _("invalid base"), len - 1); - buf[len] = '\0'; + buf[len-1] = '\0'; errno = EINVAL; return (p = buf); #else |