[tor-bugs] #9066 [- Select a component]: use a macro like CHECK_PRINTF for tor_sscanf

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jun 14 12:04:03 UTC 2013


#9066: use a macro like CHECK_PRINTF for tor_sscanf
----------------------------------+-----------------------------------------
 Reporter:  x3j11                 |          Owner:                     
     Type:  defect                |         Status:  new                
 Priority:  normal                |      Milestone:  Tor: 0.2.5.x-final 
Component:  - Select a component  |        Version:  Tor: 0.2.4.12-alpha
 Keywords:                        |         Parent:                     
   Points:                        |   Actualpoints:                     
----------------------------------+-----------------------------------------
 On OpenBSD/5.2 under gcc 4.2.1, the test case src/test/test_util.c warns
 on compile with

 src/test/test_util.c: In function 'test_util_sscanf':
 src/test/test_util.c:1570: warning: Array size (20) smaller than format
 string size (1000000) (arg 3)
 src/test/test_util.c:1675: warning: Array size (20) smaller than format
 string size (1000) (arg 3)

 This is an extra warning applied by OpenBSD for the platform's default
 compiler (see also ticket 7260 where this warning was also raised). I
 believe the cases used in the test are safe, so, to address this, let's
 start by removing the check for __GNUC__ and instead use a macro like the
 existing CHECK_PRINTF macro, so we can condition it appropriately with a
 later patch.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9066>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list