diff options
author | wiz <wiz> | 2007-11-29 18:36:34 +0000 |
---|---|---|
committer | wiz <wiz> | 2007-11-29 18:36:34 +0000 |
commit | 7c3d4af55ff6631e4afac8570567988102a56819 (patch) | |
tree | c1573b8af72dcf4049b909e38353da4b5d771171 /audio | |
parent | 3b3abbb49d8b0f0d629f5483a3fbc3c523b447df (diff) | |
download | pkgsrc-7c3d4af55ff6631e4afac8570567988102a56819.tar.gz |
Update to 1.2.11:
xmms 1.2.11
The '1211 days since last release' release. XMMS was 10 years
old on 2007-11-15.
* Make the --toggle switches take an optional value to either
enable or disable the function.
* New command line switches: --quit, --toggle-shuffle,
--toggle-repeat, --toggle-advance, --queue
* New remote commands: xmms_remote_playqueue_clear,
xmms_remote_get_playqueue_pos_from_playlist_pos,
xmms_remote_get_playlist_pos_from_playqueue_pos,
xmms_remote_playqueue_add, xmms_remote_get_playqueue_length,
xmms_remote_playqueue_remove.
* Playqueue manager. Adds queue control enabling you to reorder
the queue and a search like the jump to file dialog.
OGG/Vorbis:
* Save stream to disk adds -N if the file already exist
* Don't apply the +6dB boost if replaygain information is missing
Alsa:
* Soft volume works without mixer
Songchange:
* Optional command to run at end of song.
Diskwriter:
* Effect plugins are applied on the saved file
MPG123:
* Enable shoutcast title streaming by default
* CTRL-Q as default keybind to quit
* Close dialogs with escape key
Solaris:
* Support OSS and AMD8111
Diffstat (limited to 'audio')
-rw-r--r-- | audio/xmms-esound/Makefile | 3 | ||||
-rw-r--r-- | audio/xmms/Makefile | 4 | ||||
-rw-r--r-- | audio/xmms/Makefile.common | 7 | ||||
-rw-r--r-- | audio/xmms/PLIST.common | 3 | ||||
-rw-r--r-- | audio/xmms/distinfo | 25 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ac | 12 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ae | 14 | ||||
-rw-r--r-- | audio/xmms/patches/patch-af | 19 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ag | 8 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ah | 27 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ai | 14 | ||||
-rw-r--r-- | audio/xmms/patches/patch-aj | 55 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ak | 22 | ||||
-rw-r--r-- | audio/xmms/patches/patch-al | 13 | ||||
-rw-r--r-- | audio/xmms/patches/patch-am | 8 | ||||
-rw-r--r-- | audio/xmms/patches/patch-ao | 13 | ||||
-rw-r--r-- | audio/xmms/patches/patch-aq | 26 |
17 files changed, 47 insertions, 226 deletions
diff --git a/audio/xmms-esound/Makefile b/audio/xmms-esound/Makefile index e1665af3d4d..434743c2f94 100644 --- a/audio/xmms-esound/Makefile +++ b/audio/xmms-esound/Makefile @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.9 2006/04/06 06:21:37 reed Exp $ +# $NetBSD: Makefile,v 1.10 2007/11/29 18:36:41 wiz Exp $ # .include "../../audio/xmms/Makefile.common" PKGNAME= ${DISTNAME:S/xmms/xmms-esound/} -PKGREVISION= 3 CATEGORIES+= gnome COMMENT= XMMS plugin to output sound through the esound daemon diff --git a/audio/xmms/Makefile b/audio/xmms/Makefile index 4ebf043c972..72a2a2245d4 100644 --- a/audio/xmms/Makefile +++ b/audio/xmms/Makefile @@ -1,8 +1,6 @@ -# $NetBSD: Makefile,v 1.67 2007/06/13 22:29:20 wiz Exp $ +# $NetBSD: Makefile,v 1.68 2007/11/29 18:36:34 wiz Exp $ # -PKGREVISION= 9 - .include "Makefile.common" CONFIGURE_ARGS+= --disable-esd diff --git a/audio/xmms/Makefile.common b/audio/xmms/Makefile.common index f54ca37035d..d35807f8d9d 100644 --- a/audio/xmms/Makefile.common +++ b/audio/xmms/Makefile.common @@ -1,10 +1,9 @@ -# $NetBSD: Makefile.common,v 1.26 2007/02/22 19:26:08 wiz Exp $ +# $NetBSD: Makefile.common,v 1.27 2007/11/29 18:36:35 wiz Exp $ # -DISTNAME= xmms-1.2.10 +DISTNAME= xmms-1.2.11 CATEGORIES= audio -MASTER_SITES= http://www.xmms.org/files/1.2.x/ \ - ftp://ftp.sunet.se/pub/multimedia/xmms/1.2.x/ +MASTER_SITES= http://www.xmms.org/files/1.2.x/ EXTRACT_SUFX= .tar.bz2 MAINTAINER= rh@NetBSD.org diff --git a/audio/xmms/PLIST.common b/audio/xmms/PLIST.common index a52d9bf98f6..4cf1d2b8544 100644 --- a/audio/xmms/PLIST.common +++ b/audio/xmms/PLIST.common @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST.common,v 1.7 2006/07/08 01:22:41 minskim Exp $ +@comment $NetBSD: PLIST.common,v 1.8 2007/11/29 18:36:35 wiz Exp $ bin/wmxmms bin/xmms bin/xmms-config @@ -42,6 +42,7 @@ share/locale/da/LC_MESSAGES/xmms.mo share/locale/de/LC_MESSAGES/xmms.mo share/locale/el/LC_MESSAGES/xmms.mo share/locale/en/LC_MESSAGES/xmms.mo +share/locale/en_GB/LC_MESSAGES/xmms.mo share/locale/eo/LC_MESSAGES/xmms.mo share/locale/es/LC_MESSAGES/xmms.mo share/locale/et/LC_MESSAGES/xmms.mo diff --git a/audio/xmms/distinfo b/audio/xmms/distinfo index 1acf8206f33..5ed29339588 100644 --- a/audio/xmms/distinfo +++ b/audio/xmms/distinfo @@ -1,23 +1,16 @@ -$NetBSD: distinfo,v 1.32 2007/06/13 22:29:21 wiz Exp $ +$NetBSD: distinfo,v 1.33 2007/11/29 18:36:35 wiz Exp $ -SHA1 (xmms-1.2.10.tar.bz2) = a3c3d3756d5263183c27b3c50a7f5404cba8bfaf -RMD160 (xmms-1.2.10.tar.bz2) = 0360cbb8c326b3325bd8ebb3343c69a9788d7084 -Size (xmms-1.2.10.tar.bz2) = 2418265 bytes +SHA1 (xmms-1.2.11.tar.bz2) = 9d1eae4baab25fd35c9ddfb49321ca60222f672d +RMD160 (xmms-1.2.11.tar.bz2) = 466a624572574c56595ef34f42c43d0b74857b0a +Size (xmms-1.2.11.tar.bz2) = 2581032 bytes SHA1 (patch-aa) = 91b17156a2d0a48d8610552993357bf522aacbd0 SHA1 (patch-ab) = 806b1e8e974fe1100be90eca1ce582b9d80f3ab2 -SHA1 (patch-ac) = 208d0f9ac537a042893db02130c14a8417808f9c +SHA1 (patch-ac) = 3f09b5522d37e682cac13735b12f625a2c1e71c8 SHA1 (patch-ad) = 4b1856f43c4cd92418046afa3f9c91f6d0900328 -SHA1 (patch-ae) = ee126d0744feea2e260a0080a6903ea49a0b12ec -SHA1 (patch-af) = 9b97ab806c497533a0e4d116a072a5d7920a15a6 -SHA1 (patch-ag) = d03063c53d2b04c0d172a3e420c5cb0319e4ae59 -SHA1 (patch-ah) = a49b667b145380f501ebd932185014d4a957e287 -SHA1 (patch-ai) = c0bb82e63e6fb96327b1ee1e9ec5617fe9b55b44 -SHA1 (patch-aj) = 67a69e2a05f343a5d7c22b3f1f1cf0c25d9aeb6d -SHA1 (patch-ak) = b49316325c6f778b0d3e85007b141699cf338238 -SHA1 (patch-al) = 1457ca7b5e4e1084623207d042a8ff349eb31aaa -SHA1 (patch-am) = 6474ef355b194189345008e35a4efc9648c26397 +SHA1 (patch-ae) = 80264154ae00a4a4a3fa9ca0f0f2715c89503ed8 +SHA1 (patch-ag) = 4703bfbedeb4d17a86f9547bea981f2aef4cf6a3 +SHA1 (patch-am) = 3369b11c2db0f9d5264aaed166d3a1699a398579 SHA1 (patch-an) = 3abc68bd37018800dc70b151a5b419211a727a02 -SHA1 (patch-ao) = 2cadee08e6db7b802d1b700559705a8fe591f2dd SHA1 (patch-ap) = 101c54e2ce0e575893b8d3880ca54a021e89a8dd -SHA1 (patch-aq) = 1b5e0b7a2f3e9c529deffad63f24a498b11d96f6 +SHA1 (patch-aq) = 2a16fbd747e03df4ef0fbb94e45c79e9c3de9ac8 SHA1 (patch-ar) = b9cf22e3ab585ef255a533e56a3430f49f2fba4f diff --git a/audio/xmms/patches/patch-ac b/audio/xmms/patches/patch-ac index a47468a93af..9b18633e46a 100644 --- a/audio/xmms/patches/patch-ac +++ b/audio/xmms/patches/patch-ac @@ -1,13 +1,13 @@ -$NetBSD: patch-ac,v 1.7 2004/05/12 19:33:14 drochner Exp $ +$NetBSD: patch-ac,v 1.8 2007/11/29 18:36:35 wiz Exp $ ---- Output/OSS/Makefile.in.orig 2004-05-12 21:38:26.000000000 +0200 -+++ Output/OSS/Makefile.in 2004-05-12 21:40:23.000000000 +0200 -@@ -240,7 +240,7 @@ +--- Output/OSS/Makefile.in.orig 2007-11-16 21:54:41.000000000 +0000 ++++ Output/OSS/Makefile.in +@@ -299,7 +299,7 @@ soundcard.h + EXTRA_DIST = $(osssources) lib_LTLIBRARIES = $(ossltlibs) - libOSS_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libOSS_la_LIBADD = @GTK_LIBS@ @PTHREAD_LIBS@ +libOSS_la_LIBADD = @GTK_LIBS@ @PTHREAD_LIBS@ ${LIBOSSAUDIO} libOSS_la_SOURCES = $(ossbuildsources) INCLUDES = @GTK_CFLAGS@ -I$(top_builddir)/intl -I$(top_srcdir) - subdir = Output/OSS + all: all-am diff --git a/audio/xmms/patches/patch-ae b/audio/xmms/patches/patch-ae index 4994b635155..2369a4ad3fc 100644 --- a/audio/xmms/patches/patch-ae +++ b/audio/xmms/patches/patch-ae @@ -1,13 +1,13 @@ -$NetBSD: patch-ae,v 1.8 2004/05/12 19:33:14 drochner Exp $ +$NetBSD: patch-ae,v 1.9 2007/11/29 18:36:35 wiz Exp $ ---- Input/cdaudio/Makefile.in.orig 2004-05-12 21:39:31.000000000 +0200 -+++ Input/cdaudio/Makefile.in 2004-05-12 21:40:22.000000000 +0200 -@@ -242,7 +242,7 @@ - +--- Input/cdaudio/Makefile.in.orig 2007-11-16 21:54:40.000000000 +0000 ++++ Input/cdaudio/Makefile.in +@@ -300,7 +300,7 @@ EXTRA_DIST = $(cdaudiosources) + lib_LTLIBRARIES = $(cdaudioltlibs) INCLUDES = @GTK_CFLAGS@ -I$(top_builddir)/intl -I$(top_srcdir) libcdaudio_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libcdaudio_la_LIBADD = @GTK_LIBS@ +libcdaudio_la_LIBADD = @GTK_LIBS@ ${LIBOSSAUDIO} libcdaudio_la_SOURCES = $(cdaudiobuildsources) - subdir = Input/cdaudio - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + all: all-am + diff --git a/audio/xmms/patches/patch-af b/audio/xmms/patches/patch-af deleted file mode 100644 index ad305a407ac..00000000000 --- a/audio/xmms/patches/patch-af +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-af,v 1.6 2004/05/12 18:50:21 drochner Exp $ - ---- Output/sun/configure.c.orig 2004-05-12 22:33:27.000000000 +0200 -+++ Output/sun/configure.c 2004-05-12 22:34:11.000000000 +0200 -@@ -75,12 +75,12 @@ - xmms_cfg_write_default_file(cfgfile); - xmms_cfg_free(cfgfile); - -- configure_win_destroy(); -+ gtk_widget_destroy(configure_win); - } - - static void configure_win_cancel_cb(GtkWidget *w, gpointer data) - { -- configure_win_destroy(); -+ gtk_widget_destroy(configure_win); - } - - static void mixer_cbutton_toggled_cb(GtkWidget *w, int id) diff --git a/audio/xmms/patches/patch-ag b/audio/xmms/patches/patch-ag index db2ba6a28be..c2b614425df 100644 --- a/audio/xmms/patches/patch-ag +++ b/audio/xmms/patches/patch-ag @@ -1,8 +1,8 @@ -$NetBSD: patch-ag,v 1.5 2004/05/19 06:09:25 minskim Exp $ +$NetBSD: patch-ag,v 1.6 2007/11/29 18:36:36 wiz Exp $ ---- Output/esd/mixer.c.orig 2004-05-17 15:21:52.000000000 -0700 -+++ Output/esd/mixer.c 2004-05-17 15:21:58.000000000 -0700 -@@ -24,7 +24,7 @@ +--- Output/esd/mixer.c.orig 2006-07-16 13:40:04.000000000 +0000 ++++ Output/esd/mixer.c +@@ -25,7 +25,7 @@ #include <sys/ioctl.h> #ifdef HAVE_OSS diff --git a/audio/xmms/patches/patch-ah b/audio/xmms/patches/patch-ah deleted file mode 100644 index e807429327f..00000000000 --- a/audio/xmms/patches/patch-ah +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-ah,v 1.8 2004/11/18 06:25:11 grant Exp $ - ---- libxmms/xmmsctrl.c.orig 2004-02-24 07:31:42.000000000 +1100 -+++ libxmms/xmmsctrl.c -@@ -382,6 +382,22 @@ void xmms_remote_play_pause(gint session - remote_cmd(session, CMD_PLAY_PAUSE); - } - -+void xmms_remote_main_volume_up(gint session) -+{ -+ gint vol = xmms_remote_get_main_volume(session); -+ vol += 5; -+ xmms_remote_set_main_volume(session, vol); -+} -+ -+void xmms_remote_main_volume_down(gint session) -+{ -+ gint vol = xmms_remote_get_main_volume(session); -+ vol -= 5; -+ if (vol < 0) -+ vol = 0; -+ xmms_remote_set_main_volume(session, vol); -+} -+ - gboolean xmms_remote_is_playing(gint session) - { - return remote_get_gboolean(session, CMD_IS_PLAYING); diff --git a/audio/xmms/patches/patch-ai b/audio/xmms/patches/patch-ai deleted file mode 100644 index 3e6f0387beb..00000000000 --- a/audio/xmms/patches/patch-ai +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ai,v 1.9 2004/11/18 06:25:11 grant Exp $ - ---- libxmms/xmmsctrl.h.orig 2003-06-12 04:44:17.000000000 +1000 -+++ libxmms/xmmsctrl.h -@@ -83,6 +83,9 @@ void xmms_remote_quit(gint session); - void xmms_remote_play_pause(gint session); - void xmms_remote_playlist_ins_url_string(gint session, gchar * string, gint pos); - -+void xmms_remote_main_volume_up(gint session ); -+void xmms_remote_main_volume_down(gint session ); -+ - - #ifdef __cplusplus - }; diff --git a/audio/xmms/patches/patch-aj b/audio/xmms/patches/patch-aj deleted file mode 100644 index 2ef5d12c2d5..00000000000 --- a/audio/xmms/patches/patch-aj +++ /dev/null @@ -1,55 +0,0 @@ -$NetBSD: patch-aj,v 1.3 2004/11/18 06:25:11 grant Exp $ - ---- xmms/main.c.orig 2004-02-24 07:31:43.000000000 +1100 -+++ xmms/main.c -@@ -3212,6 +3212,8 @@ static struct option long_options[] = - {"show-main-window", 0, NULL, 'm'}, - {"version", 0, NULL, 'v'}, - {"sm-client-id", 1, NULL, 'i'}, -+ {"vol-up", 0, NULL, 'l'}, -+ {"vol-down", 0, NULL, 'q'}, - {0, 0, 0, 0} - }; - -@@ -3263,7 +3265,7 @@ void display_usage(void) - struct cmdlineopt { - GList *filenames; - int session; -- gboolean play, stop, pause, fwd, rew, play_pause; -+ gboolean play, stop, pause, fwd, rew, play_pause, louder, quieter; - gboolean enqueue, mainwin, remote; - char *previous_session_id; - }; -@@ -3275,7 +3277,7 @@ void parse_cmd_line(int argc, char **arg - - memset(opt, 0, sizeof(struct cmdlineopt)); - opt->session = -1; -- while ((c = getopt_long(argc, argv, "hn:rpusfemvt", long_options, NULL)) != -1) -+ while ((c = getopt_long(argc, argv, "hn:rpusfemvtlq", long_options, NULL)) != -1) - { - switch (c) - { -@@ -3316,6 +3318,12 @@ void parse_cmd_line(int argc, char **arg - case 'i': - opt->previous_session_id = g_strdup(optarg); - break; -+ case 'l': -+ opt->louder = TRUE; -+ break; -+ case 'q': -+ opt->quieter = TRUE; -+ break; - } - } - for (i = optind; i < argc; i++) -@@ -3380,6 +3388,10 @@ void handle_cmd_line_options(struct cmdl - xmms_remote_play_pause(opt->session); - if (opt->mainwin) - xmms_remote_main_win_toggle(opt->session, TRUE); -+ if (opt->louder) -+ xmms_remote_main_volume_up(opt->session); -+ if (opt->quieter) -+ xmms_remote_main_volume_down(opt->session); - } - - void segfault_handler(int sig) diff --git a/audio/xmms/patches/patch-ak b/audio/xmms/patches/patch-ak deleted file mode 100644 index 62e81f19d04..00000000000 --- a/audio/xmms/patches/patch-ak +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-ak,v 1.7 2005/04/27 14:57:54 wiz Exp $ - ---- xmms.m4.orig 2000-01-27 21:30:35.000000000 +0100 -+++ xmms.m4 -@@ -14,7 +14,7 @@ dnl and XMMS_VERSION for your plugin ple - dnl - - dnl XMMS_TEST_VERSION(AVAILABLE-VERSION, NEEDED-VERSION [, ACTION-IF-OKAY [, ACTION-IF-NOT-OKAY]]) --AC_DEFUN(XMMS_TEST_VERSION, [ -+AC_DEFUN([XMMS_TEST_VERSION], [ - - # Determine which version number is greater. Prints 2 to stdout if - # the second number is greater, 1 if the first number is greater, -@@ -59,7 +59,7 @@ function vercmp(ver1, ver2, ver1arr, - fi - ]) - --AC_DEFUN(AM_PATH_XMMS, -+AC_DEFUN([AM_PATH_XMMS], - [ - AC_ARG_WITH(xmms-prefix,[ --with-xmms-prefix=PFX Prefix where XMMS is installed (optional)], - xmms_config_prefix="$withval", xmms_config_prefix="") diff --git a/audio/xmms/patches/patch-al b/audio/xmms/patches/patch-al deleted file mode 100644 index 81368384ef7..00000000000 --- a/audio/xmms/patches/patch-al +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-al,v 1.9 2006/03/03 03:45:23 minskim Exp $ - ---- General/ir/ir.h.orig 2001-03-05 05:17:44.000000000 -0800 -+++ General/ir/ir.h -@@ -49,8 +49,6 @@ typedef struct - } - irConfig; - --extern pthread_t irapp_thread; --extern gboolean keepGoing; - extern irConfig ircfg; - extern gboolean irconf_is_going; - diff --git a/audio/xmms/patches/patch-am b/audio/xmms/patches/patch-am index 8182f87d86e..2d85c634848 100644 --- a/audio/xmms/patches/patch-am +++ b/audio/xmms/patches/patch-am @@ -1,8 +1,8 @@ -$NetBSD: patch-am,v 1.7 2007/03/08 15:01:50 rillig Exp $ +$NetBSD: patch-am,v 1.8 2007/11/29 18:36:39 wiz Exp $ ---- configure.orig 2004-02-23 13:44:32.000000000 -0800 +--- configure.orig 2007-11-16 21:54:45.000000000 +0000 +++ configure -@@ -19078,13 +19078,6 @@ _ACEOF +@@ -33390,13 +33390,6 @@ _ACEOF fi ;; @@ -16,7 +16,7 @@ $NetBSD: patch-am,v 1.7 2007/03/08 15:01:50 rillig Exp $ *-hpux-*) ARCH_DEFINES="-DHPUX" ;; -@@ -19099,7 +19092,7 @@ case "$host" in +@@ -33411,7 +33404,7 @@ case "$host" in i386-*-* | i486-*-* | i586-*-* | i686-*-* | i86pc-*-*) arch_type=ix86 case "$host" in diff --git a/audio/xmms/patches/patch-ao b/audio/xmms/patches/patch-ao deleted file mode 100644 index ef3d243b630..00000000000 --- a/audio/xmms/patches/patch-ao +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ao,v 1.6 2007/02/01 16:55:59 drochner Exp $ - ---- libxmms/titlestring.h.orig 2007-02-01 15:18:41.000000000 +0100 -+++ libxmms/titlestring.h -@@ -80,7 +80,7 @@ gchar *xmms_get_titlestring(gchar *fmt, - GtkWidget* xmms_titlestring_descriptions(char* tags, int rows); - - #ifdef __cplusplus --}; -+} - #endif - - #endif /* !XMMS_TITLESTRING_H */ diff --git a/audio/xmms/patches/patch-aq b/audio/xmms/patches/patch-aq index 17524c30cdd..394017c94b8 100644 --- a/audio/xmms/patches/patch-aq +++ b/audio/xmms/patches/patch-aq @@ -1,7 +1,7 @@ -$NetBSD: patch-aq,v 1.3 2007/04/10 12:19:40 drochner Exp $ +$NetBSD: patch-aq,v 1.4 2007/11/29 18:36:40 wiz Exp $ ---- ./xmms/bmp.c.orig 2002-02-12 00:15:56.000000000 +0100 -+++ ./xmms/bmp.c +--- xmms/bmp.c.orig 2006-07-16 13:40:04.000000000 +0000 ++++ xmms/bmp.c @@ -19,6 +19,12 @@ */ #include "xmms.h" @@ -12,10 +12,10 @@ $NetBSD: patch-aq,v 1.3 2007/04/10 12:19:40 drochner Exp $ +#define UINT32_MAX 0xffffffffU +#endif + - typedef struct tagRGBQUAD + struct rgb_quad { guchar rgbBlue; -@@ -184,7 +190,7 @@ GdkPixmap *read_bmp(gchar * filename) +@@ -183,7 +189,7 @@ GdkPixmap *read_bmp(gchar * filename) } else if (bitcount != 24 && bitcount != 16 && bitcount != 32) { @@ -24,23 +24,17 @@ $NetBSD: patch-aq,v 1.3 2007/04/10 12:19:40 drochner Exp $ ncols = offset - headSize - 14; if (headSize == 12) -@@ -200,10 +206,18 @@ GdkPixmap *read_bmp(gchar * filename) - } - } +@@ -203,6 +209,13 @@ GdkPixmap *read_bmp(gchar * filename) fseek(file, offset, SEEK_SET); + buffer = g_malloc(imgsize); + fread(buffer, imgsize, 1, file); + /* verify buffer size */ + if (!h || !w || + w > (((UINT32_MAX - 3) / 3) / h) || + h > (((UINT32_MAX - 3) / 3) / w)) { + g_warning("read_bmp(): width(%u)*height(%u) too large", w, h); -+ fclose(file); -+ return NULL; ++ goto failure; + } -+ data = g_malloc0((w * 3 * h) + 3); /* +3 is just for safety */ - buffer = g_malloc(imgsize); - fread(buffer, imgsize, 1, file); - fclose(file); -- data = g_malloc0((w * 3 * h) + 3); /* +3 is just for safety */ + data = g_malloc0((w * 3 * h) + 3); /* +3 is just for safety */ if (bitcount == 1) - read_1b_rgb(buffer, imgsize, data, w, h, rgb_quads); |