pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/49347: pkg nbtscan core dumps - missing function declerations
>Number: 49347
>Category: pkg
>Synopsis: pkg nbtscan core dumps - missing function declerations
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 31 14:10:00 +0000 2014
>Originator: Rob Quinn
>Release: 7.99.1 amd64 pkgsrc-current
>Organization:
>Environment:
>Description:
nbtscan core dumps on NetBSD (but not Solaris). Fixing two compiler warnings resolves the issue.
>How-To-Repeat:
Scan a subnet containing Windows/SMB hosts, there has to be a valid response to set off the bug.
gcc -O2 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBRESOLV=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_STDINT_H=1 -Dmy_uint8_t=uint8_t -Dmy_uint16_t=uint16_t -Dmy_uint32_t=uint32_t -DTIME_WITH_SYS_TIME=1 -DHAVE_SNPRINTF=1 -DHAVE_INET_ATON=1 -DHAVE_SOCKET=1 -DUNIX=1 -c nbtscan.c
nbtscan.c: In function 'v_print_hostinfo':
nbtscan.c:171:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if(hr) printf("%s\n", (char*)getnbservicename(service, unique, name));
^
nbtscan.c:179:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if(hr) printf("%s\n", (char*)getnbservicename(service, unique, name));
^
nbtscan.c: In function 'main':
nbtscan.c:525:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
hostinfo = (struct nb_host_info*)parse_response(buff, size);
^
>Fix:
# diff -c statusq.h /tmp/statusq.h
*** statusq.h Thu May 23 07:31:35 2002
--- /tmp/statusq.h Fri Oct 31 09:46:38 2014
***************
*** 103,106 ****
--- 103,109 ----
char* service_name;
} nb_service_t ;
+ extern char *getnbservicename(my_uint8_t,int,char*);
+ extern struct nb_host_info* parse_response(char*,int);
+
#endif /* STATUSQ_H */
Home |
Main Index |
Thread Index |
Old Index