Bug#825088: proj: please make nad2bin output reproducible

2016-05-23 Thread Sebastiaan Couwenberg
Control: tags -1 pending

Hi Alexis,

Thanks for the patch, I've included in the package and forwarded it
upstream who quickly applied it too.

The updated package will be uploaded to unstable soon.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



Bug#825088: proj: please make nad2bin output reproducible

2016-05-23 Thread Alexis Bienvenüe
Source: proj
Version: 4.9.2-2
Severity: wishlist
Tags: patch upstream
User: reproducible-bui...@lists.alioth.debian.org
Usertags: toolchain
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Dear Maintainer,

While working on the “reproducible builds” effort [1], we have noticed
that the nad2bin binary has unreproducible output, as it includes
uninitialized memory state when CTABLE.id's length is less than the
available 80 bytes.

See the attached patch for a proposed solution.

Regards,
Alexis Bienvenüe.

[1] https://wiki.debian.org/ReproducibleBuilds

Description: Makes nad2bin output reproducible
 Init CTABLE.id char[80] variable with zeroes, so that nad2bin output does
 not depend on memory state before call, and hence be reproducible.
Author: Alexis Bienvenüe 

--- proj-4.9.2.orig/src/nad2bin.c
+++ proj-4.9.2/src/nad2bin.c
@@ -98,6 +98,7 @@ int main(int argc, char **argv) {
 /*  Read the ASCII Table*/
 /*  */
 
+memset(ct.id,0,MAX_TAB_ID);
 if ( NULL == fgets(ct.id, MAX_TAB_ID, stdin) ) {
 perror("fgets");
 exit(1);