device: Fix memory corruption

This commit is contained in:
Pali Rohár committed 2012-11-20 21:13:18 +01:00
1 parent 463dc3c6dd
commit bd141d2739
1 file changed
+1 -1
+1 -1
View File
@@ -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;