search for: regex_array

Displaying 4 results from an estimated 4 matches for "regex_array".

Did you mean: reg_array
2006 Sep 22
1
Stack corruption in newhidups.c
Hi, (please let me know if there is a better place to submit bugs) I run a FreeBSD box with stack-protector enabled, which raises a problem in the upsdrv_initups() function of the newhidups.c module; the regex_array variable is sized one item too small. Regards, Herve Masson <<<< void upsdrv_initups(void) { int i; #ifndef SHUT_MODE /*! * SHUT is only supported by MGE UPS SYSTEMS units * So we don't need the regex mechanism */ int r; char *regex_array[5];...
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...t;regex[5], d->Bus); > + > + r = match_regex(data->regex[5], hd->Bus); > if (r != 1) { > return r; > } > + > return 1; > } > > /* constructor: create a regular expression matcher. This matcher is > - based on six regular expression strings in regex_array[0..5], > - corresponding to: vendorid, productid, vendor, product, serial, > - bus. Any of these strings can be NULL, which matches > - everything. Cflags are as in regcomp(3). Typical values for cflags > - are REG_ICASE (case insensitive matching) and REG_EXTENDED (use > -...
2020 Apr 03
0
Patch to support Powercool PCRACK-1200VA
...al("serial") ||          getval("bus") || -        getval("langid_fix") +        getval("langid_fix") || +        getval("buflen_fix")      ) {          /* USB */          is_usb = 1; @@ -1941,6 +1954,22 @@ void    upsdrv_initups(void)          regex_array[4] = getval("serial");          regex_array[5] = getval("bus"); +        /* check for buflen workaround */ +        int blen; +        if(getval("buflen_fix")) { +            if(sscanf(getval("buflen_fix"),"%d",&blen) != 1) { +               ...
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...buflen_fix")      ) {          /* USB */          is_usb = 1; @@ -1928,8 +1894,7 @@ void    upsdrv_initups(void)              { NULL }          }; -        int    ret, langid; -        char    tbuf[255];    /* Some devices choke on size > 255 */ +        int    ret;          char    *regex_array[6];          char    *subdrv = getval("subdriver"); @@ -1941,15 +1906,6 @@ void    upsdrv_initups(void)          regex_array[4] = getval("serial");          regex_array[5] = getval("bus"); -        /* Check for language ID workaround (#1) */ -        if (getval(&q...