diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2012-11-20 21:13:18 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2012-11-20 21:13:18 +0100 |
commit | bd141d27396d82335d960c179c49ecd33c020cb4 (patch) | |
tree | beedef9e77f5868dd6d6585668af299fab5b1bb0 /src/device.c | |
parent | 463dc3c6dd4e6b3ded9828f8938bf43a9dced331 (diff) | |
download | 0xFFFF-bd141d27396d82335d960c179c49ecd33c020cb4.tar.bz2 |
device: Fix memory corruption
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c index 82b3d0f..78c3a7b 100644 --- a/src/device.c +++ b/src/device.c @@ -145,7 +145,7 @@ char * hwrevs_alloc_to_string(const int16_t * hwrevs) { for ( i = 0; hwrevs[i] != -1; ++i ) len += log10(hwrevs[i])+2; - ret = calloc(1, len); + ret = calloc(1, len+1); if ( ! ret ) return NULL; |