Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Aug 2011 20:35:53 GMT
From:      Andrey Russev <ruan@mail.univ.kiev.ua>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/159395: Incorrect implementation of strncmp in boot code
Message-ID:  <201108022035.p72KZrED043139@red.freebsd.org>
Resent-Message-ID: <201108022040.p72Ke9tK013544@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108022035.p72KZrED043139>