Cyrus IMAPd 2.3.12 Released

Thomas Robers robers at tutech.de
Thu Apr 24 04:07:02 EDT 2008


Andy Fiddaman schrieb:
>> That's the line that the patch changes, and that's the old version of the
>> line, so something didn't take with your patching.
>> 
>> A.

It seems so, but I don't understand, why. Here's the patch:

> --- cyrus-imapd-2.3.12/lib/libconfig.c  2008/04/11 20:07:00     1.18
> +++ cyrus-imapd-2.3.12/lib/libconfig.c  2008/04/23 11:00:13     1.18.2.1
> @@ -39,7 +39,7 @@
>   * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
>   * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>   *
> - * $Id: libconfig.c,v 1.18 2008/04/11 20:07:00 murch Exp $
> + * $Id: libconfig.c,v 1.18.2.1 2008/04/23 11:00:13 murch Exp $
>   */
>  
>  #include <config.h>
> @@ -340,7 +340,7 @@ void config_read_file(const char *filena
>      while (fgets(buf+len, bufsize-len, infile)) {
>         if (buf[len]) {
>             len = strlen(buf);
> -           if (buf[len-1] == '\n') {
> +           if (len && buf[len-1] == '\n') {
>                 /* end of line */
>                 buf[--len] = '\0';
> ../libconfig2.patch (END)

and the patching did without error:

> imap-1:/export/build/cyrus-imapd-2.3.12# patch -p1 < ../libconfig2.patch 
> patching file lib/libconfig.c

So no errors but after installling i still get that segfault.

I also tried the other patch from Andy Fiddaman:

> --- cyrus-imapd-2.3.12/lib/libconfig.c        Tue Apr 22 20:30:33 2008
> +++ cyrus-imapd-2.3.12/lib/libconfig.c        Tue Apr 22 20:30:40 2008
> @@ -344,7 +344,7 @@
>                 /* end of line */
>                 buf[--len] = '\0';
> 
> -               if (buf[len-1] == '\\') {
> +               if (len && buf[len-1] == '\\') {
>                     /* line continuation */
>                     len--;
>                     lineno++;
> ../libconfig3.patch (END) 

but this one got rejected:

> imap-1:/export/build/cyrus-imapd-2.3.12# patch -p1 < ../libconfig3.patch 
> patching file lib/libconfig.c
> Hunk #1 FAILED at 344.
> 1 out of 1 hunk FAILED -- saving rejects to file lib/libconfig.c.rej

I'm not such an expert to see why this one got rejected.

Thomas


More information about the Info-cyrus mailing list