]> granicus.if.org Git - yasm/commitdiff
Check for fseek() error.
authorPeter Johnson <peter@tortall.net>
Thu, 15 Nov 2007 03:55:41 +0000 (03:55 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 15 Nov 2007 03:55:41 +0000 (03:55 -0000)
svn path=/trunk/yasm/; revision=2011

modules/objfmts/bin/bin-objfmt.c

index 655fab1ecd1b65d9463a9badcb33056384b5c8b9..481379d25057ca76e33050495c56447dd934ac36 100644 (file)
@@ -1069,7 +1069,8 @@ bin_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
             yasm_errwarn_propagate(info->errwarns, 0);
             return 0;
         }
-        fseek(info->f, yasm_intnum_get_int(info->tmp_intn), SEEK_SET);
+        if (fseek(info->f, yasm_intnum_get_int(info->tmp_intn), SEEK_SET) < 0)
+            yasm__fatal(N_("could not seek on output file"));
         yasm_section_bcs_traverse(sect, info->errwarns,
                                   info, bin_objfmt_output_bytecode);
     }