summaryrefslogtreecommitdiff
path: root/libpiano/src
diff options
context:
space:
mode:
Diffstat (limited to 'libpiano/src')
-rw-r--r--libpiano/src/crypt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libpiano/src/crypt.c b/libpiano/src/crypt.c
index 8111547..eef1057 100644
--- a/libpiano/src/crypt.c
+++ b/libpiano/src/crypt.c
@@ -45,6 +45,7 @@ void PianoHexToInts (const char *strHex, unsigned int **retInts,
/* unsigned int = 4 bytes, 8 chars in hex */
for (i = 0; i < strHexN; i += 8) {
memcpy (hexInt, strHex+i, sizeof (hexInt)-1);
+ hexInt[sizeof (hexInt) - 1] = 0;
sscanf (hexInt, "%x", &arrInts[i/8]);
}
*retInts = arrInts;