~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to ports/winnt/libisc/isc_strerror.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-01-05 21:10:03 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090105211003-mh6zc3um4k1uhsj7
Tags: 1:4.2.4p4+dfsg-8
It did not properly check the return value of EVP_VerifyFinal
which results in an malformed DSA signature being treated as
a good signature rather than as an error.  (CVE-2009-0021)

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
char *
32
32
GetWSAErrorMessage(int errval);
33
33
 
34
 
char *
35
 
NTstrerror(int err, BOOL *bfreebuf);
 
34
static char *
 
35
isc__NTstrerror(int err, BOOL *bfreebuf);
36
36
 
37
37
char *
38
 
strerror(int errnum) {
 
38
NTstrerror(int errnum) {
39
39
        BOOL bfreebuf;
40
 
        return (NTstrerror(errnum, &bfreebuf));
 
40
        return (isc__NTstrerror(errnum, &bfreebuf));
41
41
}
42
42
/*
43
43
 * This routine needs to free up any buffer allocated by FormatMessage
51
51
        unsigned int unum = num;
52
52
 
53
53
        freebuf = FALSE;
54
 
        msg = NTstrerror(num, &freebuf);
 
54
        msg = isc__NTstrerror(num, &freebuf);
55
55
        if (msg != NULL)
56
56
                _snprintf(buf, size, "%s", msg);
57
57
        else
90
90
 * Error message function GetWSAErrorMessage below if it's within that range
91
91
 * since those messages are not available in the system error messages.
92
92
 */
93
 
char *
94
 
NTstrerror(int err, BOOL *bfreebuf) {
 
93
static char *
 
94
isc__NTstrerror(int err, BOOL *bfreebuf) {
95
95
        char *retmsg = NULL;
96
96
 
97
97
        /* Copy the error value first in case of other errors */        
127
127
        BOOL bfreebuf = FALSE;
128
128
        char *msg;
129
129
 
130
 
        msg = NTstrerror(errval, &bfreebuf);
 
130
        msg = isc__NTstrerror(errval, &bfreebuf);
131
131
        fprintf(stderr, "%s: %s\n", errmsg, msg);
132
132
        if(bfreebuf == TRUE) {
133
133
                LocalFree(msg);