Browse Source

Merge commit '8667bb7' into bfgminer

Luke Dashjr 12 years ago
parent
commit
095b11ad8b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fpgautils.c

+ 1 - 1
fpgautils.c

@@ -149,7 +149,7 @@ char *_decode_udev_enc_dup(const char *s)
 	if (!s)
 	if (!s)
 		return NULL;
 		return NULL;
 	
 	
-	char *o = malloc(strlen(s));
+	char *o = malloc(strlen(s) + 1);
 	if (!o)
 	if (!o)
 	{
 	{
 		applog(LOG_ERR, "Failed to malloc in _decode_udev_enc_dup");
 		applog(LOG_ERR, "Failed to malloc in _decode_udev_enc_dup");