Fix core dump when using a image resolutions > 640x480. Upstream is

informed and confirmed the bug.  As soon a new version is available which
includes the fix we will remove the patch and update the port.

OK robert@
This commit is contained in:
mglocker 2008-08-25 08:52:56 +00:00
parent b488e925ef
commit c0c74e85b5
2 changed files with 14 additions and 1 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.2 2008/06/13 17:07:46 robert Exp $
# $OpenBSD: Makefile,v 1.3 2008/08/25 08:52:56 mglocker Exp $
COMMENT= V4L compatible video application
DISTNAME= luvcview-20070512
PKGNAME= ${DISTNAME}p1
CATEGORIES= graphics x11
# GPL

View File

@ -0,0 +1,12 @@
--- gui.c.orig Tue Feb 7 19:16:39 2006
+++ gui.c Mon Aug 4 12:42:28 2008
@@ -69,7 +69,8 @@ static int resize(unsigned char *INbuff, unsigned char
Cc = 0;
if (lastCc == Cc) {
/* no Chroma interleave correct by moving the index */
- rx -= 1;
+ if (rx != 0)
+ rx -= 1;
Cc = !Cc;
}
memcpy(output++, &input[ADDRESSE((int) rx, (int) y, Owidth)],