embryo_cc - check fseeek return and complain

fixes CID 996788
This commit is contained in:
Carsten Haitzler 2014-08-22 18:09:12 +09:00
parent d043c84492
commit 32e5189952
1 changed files with 2 additions and 1 deletions

View File

@ -827,7 +827,8 @@ assemble(FILE * fout, FILE * fin)
align32(&func.address);
align32(&func.nameofs);
#endif
fseek(fout, publics + count * sizeof(FUNCSTUB), SEEK_SET);
if (fseek(fout, publics + count * sizeof(FUNCSTUB), SEEK_SET) < 0)
fprintf(stderr, "Error seeking\n");
sc_writebin(fout, &func, sizeof func);
fseek(fout, nameofs, SEEK_SET);
sc_writebin(fout, sym->name, strlen(sym->name) + 1);