bugLibTMCG - Bugs: bug #53098, Compiler warning for mpz_shash.cc

 
 

bug #53098: Compiler warning for mpz_shash.cc

Submitter:  Karol Babioch <kbabioch>
Submitted:  Thu 08 Feb 2018 09:48:42 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  stamer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 21 Mar 2018 04:05:53 PM UTC, comment #3: 

The reported issue is fixed in version 1.3.12.

Heiko Stamer <stamer>
Group administrator
Sun 11 Feb 2018 07:32:18 AM UTC, comment #2: 

Please note that the oracle hash function g() was revisited. For improved strength a second regular hash function (i.e. SHA3-256) has been added:

http://git.savannah.nongnu.org/cgit/libtmcg.git/commit/?id=85db93b9e8a0bc6aad23d5ba33e5b36311f5d185



Heiko Stamer <stamer>
Group administrator
Fri 09 Feb 2018 04:14:24 PM UTC, comment #1: 

Thanks for reporting this. Unfortunately, I've seen this to late for 1.3.11. So it will be fixed in the next release:

http://git.savannah.nongnu.org/cgit/libtmcg.git/commit/?id=2bed9b7e18e0433b0c04f755fd6ab06f5c0ed938

The issue is not security relevant, because only the trailing "\0" is cut off by snprintf and this is not required inside the hashed string.

Heiko Stamer <stamer>
Group administrator
Thu 08 Feb 2018 09:48:42 PM UTC, original submission:  

/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..     -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -MT libTMCG_la-mpz_shash.lo -MD -MP -MF .deps/libTMCG_la-mpz_shash.Tpo -c -o libTMCG_la-mpz_shash.lo `test -f 'mpz_shash.cc' || echo './'`mpz_shash.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -MT libTMCG_la-mpz_shash.lo -MD -MP -MF .deps/libTMCG_la-mpz_shash.Tpo -c mpz_shash.cc  -fPIC -DPIC -o .libs/libTMCG_la-mpz_shash.o
mpz_shash.cc: In Funktion »void g(unsigned char*, size_t, const unsigned char*, size_t)«:
mpz_shash.cc:41:6: Warnung: »snprintf«-Ausgabe ist vor dem letzten Formatzeichen abgeschnitten [-Wformat-truncation=]
 void g
      ^
mpz_shash.cc:57:11: Anmerkung: »snprintf« gibt 10 Bytes in das Ziel der Größe 9 aus
   snprintf((char*)data + isize, 9, "libTMCG%02x", (uint8_t)i);
   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Karol Babioch <kbabioch>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kbabioch (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-21 stamer StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-02-09 stamer StatusIn Progress Ready For Test
    2018-02-09 stamer StatusNone In Progress
        Assigned toNone stamer

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code