diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch')
-rw-r--r-- | media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch b/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch new file mode 100644 index 000000000000..9e127b289042 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch @@ -0,0 +1,62 @@ +From 996f512cca3d19f7408e6fb9a8e0c133a54561e4 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Thu, 3 Jan 2013 16:38:52 +0100 +Subject: [PATCH] * [sources]: initialise memory for strtod + +fixes warnings in valgrind about uninitialised memory usage + +2013-03-31: backport to oyranos-0.9.1, remove patch for nonexistent file + +--- + API_generated/oyranos_object.c | 8 ++++---- + oyranos_string.c | 10 ++++++---- + +diff --git a/API_generated/oyranos_object.c b/API_generated/oyranos_object.c +index aacc2f5..1db9f42 100644 +--- a/API_generated/oyranos_object.c ++++ b/API_generated/oyranos_object.c +@@ -768,10 +768,10 @@ int oyTextIccDictMatch ( const char * text, + int n = 0, p_n = 0, i, j; + char ** texts = 0, * t; + char ** patterns = 0, * p; +- long num[2]; +- int num_valid[2]; +- double dbl[2]; +- int dbl_valid[2]; ++ long num[2] = {0,0}; ++ int num_valid[2] = {0,0}; ++ double dbl[2] = {0,0}; ++ int dbl_valid[2] = {0,0}; + + DBG_MEM_START + +diff --git a/oyranos_string.c b/oyranos_string.c +index d43b0dd..b9c9bc4 100644 +--- a/oyranos_string.c ++++ b/oyranos_string.c +@@ -68,15 +68,17 @@ int oyStringToDouble ( const char * text, + setlocale(LC_NUMERIC, "C"); + /* avoid irritating valgrind output of "Invalid read of size 8" + * might be a glibc error or a false positive in valgrind */ +- t = oyAllocateFunc_( len + 2*sizeof(long) + 1 ); ++ t = oyAllocateFunc_( len + 2*sizeof(double) + 1 ); ++ memset( t, 0, len + 2*sizeof(double) + 1 ); ++ + memcpy( t, text, len ); +- t[len] = 0; ++ + if(0 && oy_debug_memory) + { +- printf( OY_DBG_FORMAT_""OY_PRINT_POINTER" \"%s\" %d "OY_PRINT_POINTER" \"%s\"\n", ++ fprintf( stderr, OY_DBG_FORMAT_""OY_PRINT_POINTER" \"%s\" %d "OY_PRINT_POINTER" \"%s\"\n", + OY_DBG_ARGS_,(intptr_t)text, text, len, + t, t ); +- fflush( stdout ); ++ fflush( stderr ); + } + + *value = strtod( t, &p ); +-- +1.5.6.5 + + |