mirror of
https://github.com/sheumann/hush.git
synced 2024-10-31 19:04:47 +00:00
Fix a bug where numbers could be truncated to four decimal digits in certain circumstances.
This affected values from $RANDOM, and could potentially also result in corruption of pid values if they were large enough.
This commit is contained in:
parent
bb88e739e5
commit
d305e3b821
@ -224,7 +224,7 @@ char* FAST_FUNC itoa_to_buf(int n, char *buf, unsigned buflen)
|
||||
// It so happens that sizeof(int) * 3 is enough for 32+ bit ints.
|
||||
// (sizeof(int) * 3 + 2 is correct for any width, even 8-bit)
|
||||
|
||||
static char local_buf[sizeof(int) * 3];
|
||||
static char local_buf[sizeof(int) * 3 + 2];
|
||||
|
||||
/* Convert unsigned integer to ascii using a static buffer (returned). */
|
||||
char* FAST_FUNC utoa(unsigned n)
|
||||
|
Loading…
Reference in New Issue
Block a user