Update to links 2.5.
ajacoutot@ ok
This commit is contained in:
parent
428ac64b90
commit
6eae382ad2
@ -1,11 +1,10 @@
|
|||||||
# $OpenBSD: Makefile,v 1.43 2011/07/21 18:36:36 jasper Exp $
|
# $OpenBSD: Makefile,v 1.44 2012/02/27 18:21:41 fgsch Exp $
|
||||||
|
|
||||||
COMMENT= graphics and text browser
|
COMMENT= graphics and text browser
|
||||||
|
|
||||||
VER= 2.2
|
VER= 2.5
|
||||||
DISTNAME= links-${VER}
|
DISTNAME= links-${VER}
|
||||||
PKGNAME= links+-${VER}
|
PKGNAME= links+-${VER}
|
||||||
REVISION= 2
|
|
||||||
|
|
||||||
CATEGORIES= www
|
CATEGORIES= www
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
MD5 (links-2.2.tar.gz) = yZN/ntAGHyZJcxgvhx+2Zw==
|
MD5 (links-2.5.tar.gz) = LYhbLiYB4ir7AhY0B6n2fw==
|
||||||
RMD160 (links-2.2.tar.gz) = GDED/bHQu0quRZFRhuduswviT7Q=
|
RMD160 (links-2.5.tar.gz) = yQ4g9IVIsZGaMwyYOtbyWhCsX84=
|
||||||
SHA1 (links-2.2.tar.gz) = haemVf9Zn38nP3mZ2H+KEfI+ZKA=
|
SHA1 (links-2.5.tar.gz) = +7ey6bHYWYY9STxS9lBqNK7Hu40=
|
||||||
SHA256 (links-2.2.tar.gz) = CVuudOB+Jb88fgFry7pigBeyAhaBMVsKzStpwvMZHqE=
|
SHA256 (links-2.5.tar.gz) = n9++Qajcp9PsT9N2lNhSCYcv63YxvQXiWFrV1siZenk=
|
||||||
SIZE (links-2.2.tar.gz) = 4186804
|
SIZE (links-2.5.tar.gz) = 4226809
|
||||||
|
@ -1,17 +1,11 @@
|
|||||||
$OpenBSD: patch-dip_c,v 1.1 2011/07/21 18:36:36 jasper Exp $
|
$OpenBSD: patch-dip_c,v 1.2 2012/02/27 18:21:41 fgsch Exp $
|
||||||
|
|
||||||
From John Bowler <jbowler@acm.org> via NetBSD pkg/44940:
|
From John Bowler <jbowler@acm.org> via NetBSD pkg/44940:
|
||||||
It's two bugs: one, the obvious one, in the two calls to
|
|
||||||
png_set_rgb_to_gray() in dip.c; that should be *DIVIDED* by 256,
|
There is *NO* error handling, no call to setjmp();
|
||||||
not multiplied!
|
|
||||||
|
|
||||||
The other is that there is *NO* error handling, no call to setjmp();
|
|
||||||
so when png_error is called the call stack ends up destroyed and,
|
so when png_error is called the call stack ends up destroyed and,
|
||||||
apparently, the program dies in create_read_struct_2, right after
|
apparently, the program dies in create_read_struct_2, right after
|
||||||
the comment that explains why libpng is about to call abort() ;-)
|
the comment that explains why libpng is about to call abort() ;-)
|
||||||
|
|
||||||
The attached patch fixes both problems, but links will still error
|
|
||||||
out on a png_error (just with an OOM message, not an abort()).
|
|
||||||
|
|
||||||
--- dip.c.orig Sat Jul 7 23:23:39 2007
|
--- dip.c.orig Sat Jul 7 23:23:39 2007
|
||||||
+++ dip.c Thu Jul 21 20:31:14 2011
|
+++ dip.c Thu Jul 21 20:31:14 2011
|
||||||
@ -24,21 +18,3 @@ out on a png_error (just with an OOM message, not an abort()).
|
|||||||
info_ptr=png_create_info_struct(png_ptr);
|
info_ptr=png_create_info_struct(png_ptr);
|
||||||
png_set_read_fn(png_ptr,&work,(png_rw_ptr)&read_stored_data);
|
png_set_read_fn(png_ptr,&work,(png_rw_ptr)&read_stored_data);
|
||||||
png_read_info(png_ptr, info_ptr);
|
png_read_info(png_ptr, info_ptr);
|
||||||
@@ -1462,7 +1464,7 @@ unsigned char *png_data, int png_length, struct style
|
|
||||||
if (color_type==PNG_COLOR_TYPE_PALETTE){
|
|
||||||
png_set_expand(png_ptr);
|
|
||||||
#ifdef HAVE_PNG_SET_RGB_TO_GRAY
|
|
||||||
- png_set_rgb_to_gray(png_ptr,1,54.0*256,183.0*256);
|
|
||||||
+ png_set_rgb_to_gray(png_ptr,1,54.0/256,183.0/256);
|
|
||||||
#else
|
|
||||||
goto end;
|
|
||||||
#endif
|
|
||||||
@@ -1473,7 +1475,7 @@ unsigned char *png_data, int png_length, struct style
|
|
||||||
if (color_type==PNG_COLOR_TYPE_RGB ||
|
|
||||||
color_type==PNG_COLOR_TYPE_RGB_ALPHA){
|
|
||||||
#ifdef HAVE_PNG_SET_RGB_TO_GRAY
|
|
||||||
- png_set_rgb_to_gray(png_ptr, 1, 54.0*256, 183.0*256);
|
|
||||||
+ png_set_rgb_to_gray(png_ptr, 1, 54.0/256, 183.0/256);
|
|
||||||
#else
|
|
||||||
goto end;
|
|
||||||
#endif
|
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
$OpenBSD: patch-png_c,v 1.1 2011/07/08 20:38:01 naddy Exp $
|
|
||||||
|
|
||||||
Fix build with png-1.5.
|
|
||||||
|
|
||||||
--- png.c.orig Wed Jul 6 11:27:06 2011
|
|
||||||
+++ png.c Wed Jul 6 11:28:03 2011
|
|
||||||
@@ -48,7 +48,7 @@ void img_my_png_warning(png_structp a, png_const_charp
|
|
||||||
/* Error for from-web PNG images. */
|
|
||||||
void img_my_png_error(png_structp png_ptr, png_const_charp error_string)
|
|
||||||
{
|
|
||||||
- longjmp(png_ptr->jmpbuf,1);
|
|
||||||
+ png_longjmp(png_ptr,1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void png_info_callback(png_structp png_ptr, png_infop info_ptr)
|
|
||||||
@@ -203,7 +203,7 @@ void png_start(struct cached_image *cimg)
|
|
||||||
#ifdef DEBUG
|
|
||||||
if (!info_ptr) internal ("png_create_info_struct failed\n");
|
|
||||||
#endif /* #ifdef DEBUG */
|
|
||||||
- if (setjmp(png_ptr->jmpbuf)){
|
|
||||||
+ if (setjmp(png_jmpbuf(png_ptr))){
|
|
||||||
error:
|
|
||||||
png_destroy_read_struct(&png_ptr, &info_ptr,
|
|
||||||
(png_infopp)NULL);
|
|
||||||
@@ -213,7 +213,7 @@ error:
|
|
||||||
png_set_progressive_read_fn(png_ptr, NULL,
|
|
||||||
png_info_callback, png_row_callback,
|
|
||||||
png_end_callback);
|
|
||||||
- if (setjmp(png_ptr->jmpbuf)) goto error;
|
|
||||||
+ if (setjmp(png_jmpbuf(png_ptr))) goto error;
|
|
||||||
decoder=mem_alloc(sizeof(*decoder));
|
|
||||||
decoder->png_ptr=png_ptr;
|
|
||||||
decoder->info_ptr=info_ptr;
|
|
||||||
@@ -232,7 +232,7 @@ void png_restart(struct cached_image *cimg, unsigned c
|
|
||||||
png_ptr=((struct png_decoder *)(cimg->decoder))->png_ptr;
|
|
||||||
info_ptr=((struct png_decoder *)(cimg->decoder))->info_ptr;
|
|
||||||
end_callback_hit=0;
|
|
||||||
- if (setjmp(png_ptr->jmpbuf)){
|
|
||||||
+ if (setjmp(png_jmpbuf(png_ptr))){
|
|
||||||
img_end(cimg);
|
|
||||||
return;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user