Changeset 786

Show
Ignore:
Timestamp:
10/03/05 22:00:44 (8 years ago)
Author:
aprilp
Message:

libhttpd: Fixed two bugs parsing the GET query string making wifidog segfault

Location:
trunk/wifidog
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog/ChangeLog

    r765 r786  
    11# $Header$ 
     22005-10-03 Philippe April <philippe@ilesansfil.org> 
     3        * libhttpd: Fixed two bugs parsing the GET query string making wifidog segfault 
    24 
    352005-09-24 Mina Naguib <mina@ilesansfil.org> 
  • trunk/wifidog/libhttpd/protocol.c

    r447 r786  
    381381                { 
    382382                        *cp2 = *cp++; 
     383            /* 
    383384                        if (*cp2 == '.') 
    384385                        { 
     
    388389                        else 
    389390                        { 
     391            */ 
    390392                                cp2++; 
     393            /* 
    391394                        } 
     395            */ 
    392396                } 
    393397        } 
    394         *cp = 0; 
    395         tmpVal = _httpd_unescape(val); 
    396         httpdAddVariable(r, var, tmpVal); 
     398    if (val != NULL) { 
     399            *cp = 0; 
     400            tmpVal = _httpd_unescape(val); 
     401            httpdAddVariable(r, var, tmpVal); 
     402    } 
    397403        free(var); 
    398404}