Browse code

Updated return code in wwunpack.c

Ryan Pentney authored on 2013/02/15 20:51:26
Showing 1 changed files
... ...
@@ -225,7 +225,7 @@ int wwunpack(uint8_t *exe, uint32_t exesz, uint8_t *wwsect, struct cli_exe_secti
225 225
     for(i=0 ; i<scount ; i++) {
226 226
 	  if (!CLI_ISCONTAINED(exe, exesz, structs, 0x28)) {
227 227
 	    cli_dbgmsg("WWPack: structs pointer out of bounds\n");
228
-	    return 1;
228
+	    return CL_EFORMAT;
229 229
 	  }
230 230
 
231 231
       cli_writeint32(structs+8, sects[i].vsz);
... ...
@@ -236,7 +236,7 @@ int wwunpack(uint8_t *exe, uint32_t exesz, uint8_t *wwsect, struct cli_exe_secti
236 236
     }
237 237
 	if (!CLI_ISCONTAINED(exe, exesz, structs, 0x28)) {
238 238
 	  cli_dbgmsg("WWPack: structs pointer out of bounds\n");
239
-	  return 1;
239
+	  return CL_EFORMAT;
240 240
 	}
241 241
 
242 242
     memset(structs, 0, 0x28);