Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Oct 2012 02:12:34 GMT
From:      Michael Curtis <michael@moltenmercury.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/172377: Fix for p5-Image-Scale (fails to load with png-1.5.x)
Message-ID:  <201210060212.q962CY8p056729@red.freebsd.org>
Resent-Message-ID: <201210060220.q962K5BY051949@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172377
>Category:       ports
>Synopsis:       Fix for p5-Image-Scale (fails to load with png-1.5.x)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 06 02:20:05 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Michael Curtis
>Release:        9.0
>Organization:
>Environment:
FreeBSD citadel 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
p5-Image-Scale uses png_memcpy, which is now a private API in PNG and not exposed to external clients.  This causes a compile warning and the .so fails to load when Perl tries to load it, due to an unresolved symbol.
>How-To-Repeat:
Compile p5-Image-Scale against a recent libpng, load the module in Perl.
>Fix:
The attached patch (to be placed in files dir of port) changes the png_memcpy to an ordinary memcpy.  This appears to be safe, and png_memcpy is #define'd to memcpy inside libpng these days.

Patch attached with submission follows:

diff -ur work/Image-Scale-0.08/src/png.c work2/Image-Scale-0.08/src/png.c
--- src/png.c	2011-07-12 01:03:28.000000000 +1000
+++ src/png.c	2012-10-04 01:53:55.000000000 +1000
@@ -40,7 +40,7 @@
     }
  }
 
- png_memcpy(data, buffer_ptr(im->buf), len);
+ memcpy(data, buffer_ptr(im->buf), len);
  buffer_consume(im->buf, len);
  
  goto ok;



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210060212.q962CY8p056729>