aboutsummaryrefslogtreecommitdiff
path: root/miscutils/fbsplash.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/fbsplash.c')
-rw-r--r--miscutils/fbsplash.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index 9557c41db..b26ad2c15 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -34,6 +34,7 @@
34//usage: "\n commands: 'NN' (% for progress bar) or 'exit'" 34//usage: "\n commands: 'NN' (% for progress bar) or 'exit'"
35 35
36#include "libbb.h" 36#include "libbb.h"
37#include "common_bufsiz.h"
37#include <linux/fb.h> 38#include <linux/fb.h>
38 39
39/* If you want logging messages on /tmp/fbsplash.log... */ 40/* If you want logging messages on /tmp/fbsplash.log... */
@@ -372,11 +373,12 @@ static void fb_drawimage(void)
372 * - A raster of Width * Height pixels in triplets of rgb 373 * - A raster of Width * Height pixels in triplets of rgb
373 * in pure binary by 1 or 2 bytes. (we support only 1 byte) 374 * in pure binary by 1 or 2 bytes. (we support only 1 byte)
374 */ 375 */
375#define concat_buf bb_common_bufsiz1 376#define concat_buf bb_common_bufsiz1
377#define sizeof_concat_buf COMMON_BUFSIZE
376 read_ptr = concat_buf; 378 read_ptr = concat_buf;
377 while (1) { 379 while (1) {
378 int w, h, max_color_val; 380 int w, h, max_color_val;
379 int rem = concat_buf + sizeof(concat_buf) - read_ptr; 381 int rem = concat_buf + sizeof_concat_buf - read_ptr;
380 if (rem < 2 382 if (rem < 2
381 || fgets(read_ptr, rem, theme_file) == NULL 383 || fgets(read_ptr, rem, theme_file) == NULL
382 ) { 384 ) {