]> git.pld-linux.org Git - packages/courier-imap.git/commitdiff
- fixed substitution variables' value cache in myownquery.patch courier-imap-1_4_1-4
authorsiefca <siefca@pld-linux.org>
Tue, 8 Jan 2002 21:03:32 +0000 (21:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    courier-imap-myownquery.patch -> 1.5
    courier-imap.spec -> 1.58

courier-imap-myownquery.patch
courier-imap.spec

index ac750e8050ed2c4c9257e3ea0b96793c4a08d63e..35b2e79d17b775f7ce9c4cf084f7306743888773 100644 (file)
@@ -766,6 +766,7 @@ diff -Nur courier-imap-1.3.12.orig/authlib/authmysqllib.c courier-imap-1.3.12/au
 +/* siefca@pld.org.pl */
 +static char *parse_string (const char *source, struct var_data *vdt)
 +{
++struct        var_data *vdp   = NULL;
 +char  *output_buf     = NULL,
 +      *pass_buf       = NULL;
 +size_t        buf_size        = 2;
@@ -778,6 +779,10 @@ diff -Nur courier-imap-1.3.12.orig/authlib/authmysqllib.c courier-imap-1.3.12/au
 +              return NULL;
 +      }
 +
++        /* zero var_data length cache - important! */
++        for (vdp=vdt; vdp->name; vdp++)
++                  vdp->value_length = 0;
++
 +      /* phase 1 - count and validate string */
 +      if ( (parse_core (source, vdt, &ParsePlugin_counter, &buf_size)) != 0)
 +              return NULL;
@@ -785,20 +790,15 @@ diff -Nur courier-imap-1.3.12.orig/authlib/authmysqllib.c courier-imap-1.3.12/au
 +      /* phase 2 - allocate memory */
 +      output_buf = malloc (buf_size);
 +      if (!output_buf)
-+      {
-+              perror ("malloc");
-+              return NULL;
-+      }
++              { perror ("malloc"); return NULL; }
++
 +      pass_buf = output_buf;
 +
 +      /* phase 3 - build the output string */
 +      if ( (parse_core (source, vdt, &ParsePlugin_builder, &pass_buf)) != 0)
-+      {
-+              free (output_buf);
-+              return NULL;
-+      }       
-+      *pass_buf = '\0';
++              { free (output_buf); return NULL; }
 +      
++      *pass_buf = '\0';
 +      return output_buf;
 +}
 +
index 930e3c5f62da41bd3f6975d6cdfb3acedab75399..af3e2d1a61aeb910cb712699553ce611c661a385 100644 (file)
@@ -7,7 +7,7 @@ Summary:        Courier-IMAP server
 Summary(pl):   Serwer Courier-IMAP
 Name:          courier-imap
 Version:       1.4.1
-Release:       3
+Release:       4
 License:       GPL
 Group:         Networking/Daemons
 Group(de):     Netzwerkwesen/Server
This page took 0.037586 seconds and 4 git commands to generate.