diff options
-rw-r--r-- | firmware/target/hosted/sdl/lcd-charcells.c | 12 | ||||
-rwxr-xr-x | tools/configure | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/firmware/target/hosted/sdl/lcd-charcells.c b/firmware/target/hosted/sdl/lcd-charcells.c index 9ceb5de391..3a623827db 100644 --- a/firmware/target/hosted/sdl/lcd-charcells.c +++ b/firmware/target/hosted/sdl/lcd-charcells.c @@ -167,7 +167,11 @@ void screen_dump(void) if (fd < 0) return; - write(fd, bmpheader, sizeof(bmpheader)); + if(write(fd, bmpheader, sizeof(bmpheader)) != sizeof(bmpheader)) + { + close(fd); + return; + } SDL_LockSurface(lcd_surface); /* BMP image goes bottom up */ @@ -191,7 +195,11 @@ void screen_dump(void) dst_mask = 0x80; } } - write(fd, line, sizeof(line)); + if(write(fd, line, sizeof(line)) != sizeof(line)) + { + close(fd); + return; + } } SDL_UnlockSurface(lcd_surface); close(fd); diff --git a/tools/configure b/tools/configure index ed3f0a4938..b682cbd223 100755 --- a/tools/configure +++ b/tools/configure @@ -3827,8 +3827,6 @@ if test -n "$t_cpu"; then elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl" TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted" - #disable _FORTIFY_SOURCE for simulator builds - GCCOPTS="$GCCOPTS -U_FORTIFY_SOURCE" fi TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer" |