File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed
regression/cbmc-library/inet_ntoa-01 Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ #ifndef _WIN32
2+ # include <arpa/inet.h>
3+ #endif
4+
5+ int main ()
6+ {
7+ #ifndef _WIN32
8+ struct in_addr input ;
9+ char * result = inet_ntoa (input );
10+ (void )* result ;
11+ #endif
12+ return 0 ;
13+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --pointer-check --bounds-check
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ ^VERIFICATION SUCCESSFUL$
7+ --
8+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -51,6 +51,28 @@ int inet_aton(const char *cp, struct in_addr *pin)
5151
5252#endif
5353
54+ /* FUNCTION: inet_ntoa */
55+
56+ #ifndef _WIN32
57+
58+ # ifndef __CPROVER_INET_H_INCLUDED
59+ # include <arpa/inet.h>
60+ # define __CPROVER_INET_H_INCLUDED
61+ # endif
62+
63+ char __inet_ntoa_buffer [16 ];
64+
65+ char * inet_ntoa (struct in_addr in )
66+ {
67+ __CPROVER_HIDE :;
68+ (void )in ;
69+ // the last byte remains zero to ensure string termination
70+ __CPROVER_havoc_slice (__inet_ntoa_buffer , 15 );
71+ return __inet_ntoa_buffer ;
72+ }
73+
74+ #endif
75+
5476/* FUNCTION: inet_network */
5577
5678#ifndef _WIN32
You can’t perform that action at this time.
0 commit comments