Bug 151312

Summary: libnet-1.1.2.1-7: four buglets
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Ladislav Michnovic <lmichnovic>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None CC: mmarek
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2006-02-15 21:17:04 UTC
I just tried to compile package libnet-1.1.2.1-7 with the Intel C 
compiler.

It said

1.

libnet_cq.c(117): warning #175: subscript out of range

The source code is

	        l->label[LIBNET_LABEL_SIZE] = '\0';

but

linux:/usr/src/packages/SPECS # find ../BUILD/libnet/ -name \*.h -print | xargs fgrep "label["
../BUILD/libnet/include/libnet/libnet-structures.h:    char label[LIBNET_LABEL_SIZE];      /* textual label for cq interface */

so l->label[LIBNET_LABEL_SIZE] does not exist. Suggest code rework.

2.

libnet_cq.c(148): warning #175: subscript out of range
libnet_init.c(80): warning #175: subscript out of range

Duplicates.

3.

icmp6_echoreq.c(119): warning #592: variable "src_ip" is used before its value is set

The source code is 

	libnet_addr2name6_r(src_ip,1,srcname,sizeof(srcname));

Suggest initialise local variable "src_ip" before first use.
Comment 1 Ladislav Michnovic 2006-02-16 15:50:29 UTC
I'll take care of it. Thanks for reporting.
Comment 2 Ladislav Michnovic 2006-02-17 13:12:16 UTC
Code reworked, package have been submited.