Skip to content

Commit

Permalink
fix wlink to report damaged library insted of sillently ignore it
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Apr 14, 2019
1 parent c200b40 commit 4d4e3bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bld/wl/c/libr.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static int ReadOMFDict( file_list *list, unsigned_8 *header, bool makedict )
header += sizeof( unsigned_32 );
omf_dict->pages = _ReadLittleEndian16UN( header );
header += sizeof( unsigned_16 );
if( omf_dict->start == 0 || omf_dict->pages == 0 ) {
if( omf_dict->start == 0 || omf_dict->pages == 0 || ( omf_dict->start + omf_dict->pages * DIC_REC_SIZE ) > list->infile->len ) {
BadLibrary( list );
return( -1 );
}
Expand Down Expand Up @@ -457,8 +457,8 @@ static void SetDict( file_list *lib, unsigned dict_page )
unsigned num_buckets;
unsigned residue;
unsigned bucket;
long off;
long dictoff;
long off;
long dictoff;
omf_dict_entry *dict;

dict = &lib->u.dict->o;
Expand Down

0 comments on commit 4d4e3bb

Please sign in to comment.