Browse Source

Bugfix: hashbusterusb: Ensure unlock code is always allocated, even if null

Luke Dashjr 12 years ago
parent
commit
2f28d15d06
1 changed files with 3 additions and 0 deletions
  1. 3 0
      driver-hashbusterusb.c

+ 3 - 0
driver-hashbusterusb.c

@@ -475,6 +475,9 @@ const char *hashbusterusb_tui_handle_choice(struct cgpu_info * const proc, const
 		{
 		{
 			char *input = curses_input("VRM unlock code");
 			char *input = curses_input("VRM unlock code");
 			
 			
+			if (!input)
+				input = calloc(1, 1);
+			
 			const bool rv = hashbusterusb_vrm_unlock(proc, input);
 			const bool rv = hashbusterusb_vrm_unlock(proc, input);
 			free(input);
 			free(input);