From 099b055bb167deb3daa549718980c54c0bc5473a Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 15 Nov 2007 03:55:41 +0000 Subject: [PATCH] Check for fseek() error. svn path=/trunk/yasm/; revision=2011 --- modules/objfmts/bin/bin-objfmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c index 655fab1e..481379d2 100644 --- a/modules/objfmts/bin/bin-objfmt.c +++ b/modules/objfmts/bin/bin-objfmt.c @@ -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); } -- 2.40.0