misc/159395: Incorrect implementation of strncmp in boot code

Andrey Russev ruan at mail.univ.kiev.ua
Tue Aug 2 20:40:11 UTC 2011


>Number:         159395
>Category:       misc
>Synopsis:       Incorrect implementation of strncmp in boot code
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 02 20:40:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Russev
>Release:        8.2-RELEASE
>Organization:
>Environment:
>Description:
Implementation of strncmp function in sys/boot/common/util.c differs from libc version. You have to use strncmp(str1, str2, len - 1) instead of strncmp(str1, str2, len) to archieve similar effect. For example, strncmp(str1, str2, 0) returns zero if libc version is used and difference of first characters if util.c version is used. 
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list