Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2119621.tGgDR8SyBF@main.pennware.com>
Date: Sat, 26 May 2012 16:11:54 -0500
From: Richard Pennington <rich@...nware.com>
To: musl@...ts.openwall.com
Subject: A small bug in mbsinit()

mbsinit() is supposed to return a non-zero value if passed a NULL pointer. 
Here's a fix:

int mbsinit(const mbstate_t *st)
{
        if (st == NULL)
            return -1;
        return !*(unsigned *)st;
}

-Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.