Update to feh-2.9.2
This commit is contained in:
parent
8de7650724
commit
cbcb07e549
@ -1,9 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.50 2013/04/22 20:38:43 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.51 2013/05/20 07:56:48 dcoppa Exp $
|
||||
|
||||
COMMENT= lightweight image viewer
|
||||
|
||||
DISTNAME= feh-2.9.1
|
||||
REVISION= 0
|
||||
DISTNAME= feh-2.9.2
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
CATEGORIES= graphics
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (feh-2.9.1.tar.bz2) = SgLSMow3rn198JxJzPy62QRYc1sTLHCTcEezOV+0WSU=
|
||||
SIZE (feh-2.9.1.tar.bz2) = 2079016
|
||||
SHA256 (feh-2.9.2.tar.bz2) = JNC+AEsWIHmBqjeiTanrcnGJeP/sKL4e7qZLlUHWbT4=
|
||||
SIZE (feh-2.9.2.tar.bz2) = 2081602
|
||||
|
148
graphics/feh/patches/patch-src_slideshow_c
Normal file
148
graphics/feh/patches/patch-src_slideshow_c
Normal file
@ -0,0 +1,148 @@
|
||||
$OpenBSD: patch-src_slideshow_c,v 1.7 2013/05/20 07:56:48 dcoppa Exp $
|
||||
|
||||
commit 27a1fb87555b40e0ad4d0f24640801dd527ed4a4
|
||||
Author: Daniel Friesel <derf@finalrewind.org>
|
||||
Date: Thu May 9 20:59:02 2013 +0200
|
||||
|
||||
Fix feh_printf buffer overflows
|
||||
|
||||
--- src/slideshow.c.orig Mon May 20 09:30:12 2013
|
||||
+++ src/slideshow.c Mon May 20 09:39:04 2013
|
||||
@@ -476,107 +476,107 @@ char *feh_printf(char *str, feh_file * file, winwidget
|
||||
switch (*c) {
|
||||
case 'f':
|
||||
if (file)
|
||||
- strcat(ret, file->filename);
|
||||
+ strncat(ret, file->filename, sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'F':
|
||||
if (file)
|
||||
- strcat(ret, shell_escape(file->filename));
|
||||
+ strncat(ret, shell_escape(file->filename), sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'h':
|
||||
if (file && (file->info || !feh_file_info_load(file, NULL))) {
|
||||
snprintf(buf, sizeof(buf), "%d", file->info->height);
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
snprintf(buf, sizeof(buf), "%d", gib_list_length(filelist));
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'm':
|
||||
- strcat(ret, mode);
|
||||
+ strncat(ret, mode, sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'n':
|
||||
if (file)
|
||||
- strcat(ret, file->name);
|
||||
+ strncat(ret, file->name, sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'N':
|
||||
if (file)
|
||||
- strcat(ret, shell_escape(file->name));
|
||||
+ strncat(ret, shell_escape(file->name), sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'o':
|
||||
if (winwid) {
|
||||
snprintf(buf, sizeof(buf), "%d,%d", winwid->im_x,
|
||||
winwid->im_y);
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
if (file && (file->info || !feh_file_info_load(file, NULL))) {
|
||||
snprintf(buf, sizeof(buf), "%d", file->info->pixels);
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 'P':
|
||||
if (file && (file->info || !feh_file_info_load(file, NULL))) {
|
||||
- strcat(ret, format_size(file->info->pixels));
|
||||
+ strncat(ret, format_size(file->info->pixels), sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
if (winwid) {
|
||||
snprintf(buf, sizeof(buf), "%.1f", winwid->im_angle);
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
if (file && (file->info || !feh_file_info_load(file, NULL))) {
|
||||
snprintf(buf, sizeof(buf), "%d", file->info->size);
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 'S':
|
||||
if (file && (file->info || !feh_file_info_load(file, NULL))) {
|
||||
- strcat(ret, format_size(file->info->size));
|
||||
+ strncat(ret, format_size(file->info->size), sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
if (file && (file->info || !feh_file_info_load(file, NULL))) {
|
||||
- strcat(ret, file->info->format);
|
||||
+ strncat(ret, file->info->format, sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
snprintf(buf, sizeof(buf), "%d",
|
||||
current_file != NULL ? gib_list_num(filelist, current_file)
|
||||
+ 1 : 0);
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'v':
|
||||
- strcat(ret, VERSION);
|
||||
+ strncat(ret, VERSION, sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'V':
|
||||
snprintf(buf, sizeof(buf), "%d", getpid());
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
case 'w':
|
||||
if (file && (file->info || !feh_file_info_load(file, NULL))) {
|
||||
snprintf(buf, sizeof(buf), "%d", file->info->width);
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case 'z':
|
||||
if (winwid) {
|
||||
snprintf(buf, sizeof(buf), "%.2f", winwid->zoom);
|
||||
- strcat(ret, buf);
|
||||
+ strncat(ret, buf, sizeof(ret) - strlen(ret));
|
||||
}
|
||||
break;
|
||||
case '%':
|
||||
- strcat(ret, "%");
|
||||
+ strncat(ret, "%", sizeof(ret) - strlen(ret));
|
||||
break;
|
||||
default:
|
||||
weprintf("Unrecognized format specifier %%%c", *c);
|
||||
strncat(ret, c - 1, 2);
|
||||
break;
|
||||
}
|
||||
- } else if ((*c == '\\') && (*(c+1) != '\0')) {
|
||||
+ } else if ((*c == '\\') && (*(c+1) != '\0') && ((strlen(ret) + 3) < sizeof(ret))) {
|
||||
c++;
|
||||
switch (*c) {
|
||||
case 'n':
|
||||
@@ -586,7 +586,7 @@ char *feh_printf(char *str, feh_file * file, winwidget
|
||||
strncat(ret, c - 1, 2);
|
||||
break;
|
||||
}
|
||||
- } else
|
||||
+ } else if ((strlen(ret) + 2) < sizeof(ret))
|
||||
strncat(ret, c, 1);
|
||||
}
|
||||
return(ret);
|
@ -1,16 +0,0 @@
|
||||
$OpenBSD: patch-src_winwidget_c,v 1.13 2013/04/22 20:38:43 dcoppa Exp $
|
||||
|
||||
Fix -F --zoom 100 not working when compiling feh with gcc and enabled
|
||||
optimizations (git commit cc7cb9f381e2687933b960da3599097beb727554)
|
||||
|
||||
--- src/winwidget.c.orig Mon Apr 22 21:51:47 2013
|
||||
+++ src/winwidget.c Mon Apr 22 22:08:58 2013
|
||||
@@ -477,7 +477,7 @@ void winwidget_render_image(winwidget winwid, int resi
|
||||
double old_zoom = winwid->zoom;
|
||||
|
||||
winwid->zoom = 0.01 * opt.default_zoom;
|
||||
- if (winwid->zoom != 1.0) {
|
||||
+ if (opt.default_zoom != 100) {
|
||||
if ((winwid->im_h * winwid->zoom) > max_h)
|
||||
winwid->zoom = old_zoom;
|
||||
else if ((winwid->im_w * winwid->zoom) > max_w)
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.9 2013/03/14 13:25:30 dcoppa Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.10 2013/05/20 07:56:48 dcoppa Exp $
|
||||
@bin bin/feh
|
||||
bin/feh-cam
|
||||
bin/gen-cam-menu
|
||||
@ -25,7 +25,8 @@ share/feh/fonts/black.style
|
||||
share/feh/fonts/menu.style
|
||||
share/feh/fonts/yudit.ttf
|
||||
share/feh/images/
|
||||
share/feh/images/logo.svg
|
||||
share/feh/images/feh.png
|
||||
share/feh/images/feh.svg
|
||||
share/feh/images/menubg_aluminium.png
|
||||
share/feh/images/menubg_aqua.png
|
||||
share/feh/images/menubg_black.png
|
||||
|
Loading…
Reference in New Issue
Block a user