Ticket #99: openvpn-2.2-RC-oldgcc.patch

File openvpn-2.2-RC-oldgcc.patch, 749 bytes (added by Simon Matter, 12 years ago)
  • openvpn-2.2-RC/plugin/auth-pam/auth-pam.c

    old new  
    119119static char *
    120120searchandreplace(const char *tosearch, const char *searchfor, const char *replacewith)
    121121{
    122   if (!tosearch || !searchfor || !replacewith) return 0;
    123   if (!strlen(tosearch) || !strlen(searchfor) || !strlen(replacewith)) return 0;
    124 
    125122  const char *searching=tosearch;
    126123  char *scratch;
    127124  char temp[strlen(tosearch)*10];
    128125  temp[0]=0;
    129126
     127  if (!tosearch || !searchfor || !replacewith) return 0;
     128  if (!strlen(tosearch) || !strlen(searchfor) || !strlen(replacewith)) return 0;
     129
    130130  scratch = strstr(searching,searchfor);
    131131  if (!scratch) return strdup(tosearch);
    132132