- Fix checking unitialized variable

- While here, add LICENSE

PR:		194210
Submitted by:	enslay@gmail.com
MFH:		2014Q4
This commit is contained in:
Dmitry Marakasov 2014-10-07 15:51:50 +00:00
parent fd6b682435
commit 6483ae4b2a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370352
2 changed files with 24 additions and 1 deletions

View file

@ -3,13 +3,16 @@
PORTNAME= gimageview
PORTVERSION= 0.2.27
PORTREVISION= 17
PORTREVISION= 18
CATEGORIES= graphics
MASTER_SITES= SF/gtkmmviewer/${PORTNAME}/${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Yet another GTK+ based image viewer
LICENSE= GPLv2 # or later
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
libpng15.so:${PORTSDIR}/graphics/png

View file

@ -0,0 +1,20 @@
Fixes check on unitialized variable
--- plugins/image_view/gimv_mplayer.c.orig 2004-09-29 03:42:14.000000000 -0500
+++ plugins/image_view/gimv_mplayer.c 2014-10-06 23:43:40.000000000 -0400
@@ -1480,13 +1480,13 @@
gint i, len, size;
gchar *src, *end;
+ src = buf;
+ size = bufsize;
+
g_return_if_fail (buf && stock_buf);
g_return_if_fail (size > 0 || size < GIMV_MPLAYER_BUF_SIZE);
g_return_if_fail (remain_size);
- src = buf;
- size = bufsize;
-
while (src && size >= 0) {
end = NULL;