Loading src/feh_png.c +4 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,10 @@ int feh_png_file_is_png(FILE * fp) { unsigned char buf[8]; fread(buf, 1, 8, fp); if (fread(buf, 1, 8, fp) != 8) { return 0; } if (png_sig_cmp(buf, 0, 8)) { return 0; } Loading src/filelist.c +3 −2 Original line number Diff line number Diff line Loading @@ -398,7 +398,7 @@ void feh_file_dirname(char *dst, feh_file * f, int maxlen) return; } strncpy(dst, f->filename, n); memcpy(dst, f->filename, n); dst[n] = '\0'; } Loading Loading @@ -650,7 +650,8 @@ char *feh_absolute_path(char *path) path you give it is relative. Linux and BSD get this right... */ if (getcwd(cwd, sizeof(cwd)) == NULL) eprintf("Cannot determine working directory:"); snprintf(temp, sizeof(temp), "%s/%s", cwd, path); if ((size_t) snprintf(temp, sizeof(temp), "%s/%s", cwd, path) >= sizeof(temp)) eprintf("Absolute path for working directory was truncated"); if (realpath(temp, fullpath) != NULL) { ret = estrdup(fullpath); } else { Loading src/imlib.c +1 −3 Original line number Diff line number Diff line Loading @@ -494,9 +494,7 @@ static char *feh_dcraw_load_image(char *filename) close(fd); return NULL; } else if (childpid == 0) { close(1); dup(fd); dup2(fd, STDOUT_FILENO); close(fd); alarm(opt.conversion_timeout); Loading src/slideshow.c +2 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,8 @@ void feh_action_run(feh_file * file, char *action, winwidget winwid) if (opt.verbose && !opt.list && !opt.customlist) fprintf(stderr, "Running action -->%s<--\n", sys); system(sys); if (system(sys) == -1) perror("running action via system() failed"); } return; } Loading src/wallpaper.c +4 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,10 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, feh_wm_load_next(&im); fil = FEH_FILE(filelist->data)->filename; } snprintf(sendbuf, sizeof(sendbuf), "background %s bg.file %s", bgname, fil); if ((size_t) snprintf(sendbuf, sizeof(sendbuf), "background %s bg.file %s", bgname, fil) >= sizeof(sendbuf)) { weprintf("Writing to IPC send buffer was truncated"); return; } enl_ipc_send(sendbuf); if (scaled) { Loading Loading
src/feh_png.c +4 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,10 @@ int feh_png_file_is_png(FILE * fp) { unsigned char buf[8]; fread(buf, 1, 8, fp); if (fread(buf, 1, 8, fp) != 8) { return 0; } if (png_sig_cmp(buf, 0, 8)) { return 0; } Loading
src/filelist.c +3 −2 Original line number Diff line number Diff line Loading @@ -398,7 +398,7 @@ void feh_file_dirname(char *dst, feh_file * f, int maxlen) return; } strncpy(dst, f->filename, n); memcpy(dst, f->filename, n); dst[n] = '\0'; } Loading Loading @@ -650,7 +650,8 @@ char *feh_absolute_path(char *path) path you give it is relative. Linux and BSD get this right... */ if (getcwd(cwd, sizeof(cwd)) == NULL) eprintf("Cannot determine working directory:"); snprintf(temp, sizeof(temp), "%s/%s", cwd, path); if ((size_t) snprintf(temp, sizeof(temp), "%s/%s", cwd, path) >= sizeof(temp)) eprintf("Absolute path for working directory was truncated"); if (realpath(temp, fullpath) != NULL) { ret = estrdup(fullpath); } else { Loading
src/imlib.c +1 −3 Original line number Diff line number Diff line Loading @@ -494,9 +494,7 @@ static char *feh_dcraw_load_image(char *filename) close(fd); return NULL; } else if (childpid == 0) { close(1); dup(fd); dup2(fd, STDOUT_FILENO); close(fd); alarm(opt.conversion_timeout); Loading
src/slideshow.c +2 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,8 @@ void feh_action_run(feh_file * file, char *action, winwidget winwid) if (opt.verbose && !opt.list && !opt.customlist) fprintf(stderr, "Running action -->%s<--\n", sys); system(sys); if (system(sys) == -1) perror("running action via system() failed"); } return; } Loading
src/wallpaper.c +4 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,10 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, feh_wm_load_next(&im); fil = FEH_FILE(filelist->data)->filename; } snprintf(sendbuf, sizeof(sendbuf), "background %s bg.file %s", bgname, fil); if ((size_t) snprintf(sendbuf, sizeof(sendbuf), "background %s bg.file %s", bgname, fil) >= sizeof(sendbuf)) { weprintf("Writing to IPC send buffer was truncated"); return; } enl_ipc_send(sendbuf); if (scaled) { Loading