File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 21
21
22
22
#include "libpe/hashes.h"
23
23
24
+ #include "libpe/error.h"
24
25
#include "libpe/pe.h"
25
26
#include "libfuzzy/fuzzy.h"
26
27
#include "libpe/ordlookup.h"
@@ -139,9 +140,6 @@ static pe_err_e get_headers_optional_hash(pe_ctx_t *ctx, pe_hash_t *output) {
139
140
const IMAGE_OPTIONAL_HEADER * sample = pe_optional (ctx );
140
141
141
142
switch (sample -> type ) {
142
- default :
143
- // TODO(jweyrich): handle unknown type.
144
- exit (1 );
145
143
case MAGIC_ROM :
146
144
{
147
145
const unsigned char * data = (const unsigned char * )sample -> _rom ;
@@ -160,6 +158,8 @@ static pe_err_e get_headers_optional_hash(pe_ctx_t *ctx, pe_hash_t *output) {
160
158
const uint64_t data_size = sizeof (IMAGE_OPTIONAL_HEADER_64 );
161
159
return get_hashes (output , "IMAGE_OPTIONAL_HEADER_64" , data , data_size );
162
160
}
161
+ default :
162
+ return LIBPE_E_UNSUPPORTED_IMAGE ;
163
163
}
164
164
}
165
165
You can’t perform that action at this time.
0 commit comments