[Kolab-devel] [issue1673] PHP segmentation fault using the "imap_getannotation" patch

Gunnar Wrobel kolab-issues at intevation.de
Fri Mar 23 14:57:00 CET 2007


New submission from Gunnar Wrobel <p at rdus.de>:

I am able to get a reproducible segmentation fault using the patched php version
(see merge16). 

Do the following to reproduce the error:

1. Create an IMAP folder on a Kolab server (it will be called "Neuer Notizblock"
in this example")

2. Set an annotation on this folder using cyradm. Make sure the annotation value
is empty (in the example the annotation is called "/vendor/kolab/h-share-attr-desc")

> mboxcfg "user/wrobel/Neuer Notizblock at demo2.pardus.de"
/vendor/kolab/h-share-attr-desc ""
> info "user/wrobel/Neuer Notizblock at demo2.pardus.de"                          
           
{user/wrobel/Neuer Notizblock at demo2.pardus.de}:
  lastupdate: 23-Mar-2007 14:06:16 +0100
  partition: default
  size: 0
  folder-type: note
  h-share-attr-desc: 

3. Now run the following PHP script on the server (you will need to replace the
settings for accessing your IMAP server in the imap_open call).

php -r '$imap =
imap_open("{localhost:143/notls}","wrobel at demo2.pardus.de","test",OP_HALFOPEN);imap_reopen($imap,
"INBOX/Neuer Notizblock");var_dump(imap_getannotation($imap, "INBOX/Neuer
Notizblock","/vendor/kolab/h-share-attr-desc","value.shared"));imap_close($imap);'
Speicherzugriffsfehler

While the above is done using PHP on Gentoo

php --version                                                                  
                                       PHP 5.1.6-pl20-gentoo (cli) (built: Mar
13 2007 12:35:15)                                                              
     Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

I get the same error when using PHP provided by the newest Kolab-2.1_RC1 candidate:

/kolab/bin/php -r '$imap =
imap_open("{localhost:143/notls}","wrobel at demo2.pardus.de","test",OP_HALFOPEN);imap_reopen($imap,
"INBOX/Neuer Notizblock");var_dump(imap_getannotation($imap, "INBOX/Neuer
Notizblock","/vendor/kolab/h-share-attr-desc","value.shared"));imap_close($imap);'
Speicherzugriffsfehler

/kolab/bin/php --version
PHP 4.4.0 (cli) (built: Mar 19 2007 17:00:53)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

The error vanishes once I assign a value or remove the annotation value:

> mboxcfg "user/wrobel/Neuer Notizblock at demo2.pardus.de"
/vendor/kolab/h-share-attr-desc "test"
/kolab/bin/php -r '$imap =
imap_open("{localhost:143/notls}","wrobel at demo2.pardus.de","test",OP_HALFOPEN);imap_reopen($imap,
"INBOX/Neuer Notizblock");var_dump(imap_getannotation($imap, "INBOX/Neuer
Notizblock","/vendor/kolab/h-share-attr-desc","value.shared"));imap_close($imap);'
array(1) {
  ["value.shared"]=>
  string(4) "test"
}

> mboxcfg "user/wrobel/Neuer Notizblock at demo2.pardus.de"
/vendor/kolab/h-share-attr-desc 
/kolab/bin/php -r '$imap =
imap_open("{localhost:143/notls}","wrobel at demo2.pardus.de","test",OP_HALFOPEN);imap_reopen($imap,
"INBOX/Neuer Notizblock");var_dump(imap_getannotation($imap, "INBOX/Neuer
Notizblock","/vendor/kolab/h-share-attr-desc","value.shared"));imap_close($imap);'
array(0) {
}

----------
assignedto: martin
messages: 10069
nosy: bernhard, martin, thomas, wilde, wrobel
priority: critical
status: unread
title: PHP segmentation fault using the "imap_getannotation" patch
topic: server
________________________________________________
Kolab issue tracker <kolab-issues at intevation.de>
<https://intevation.de/roundup/kolab/issue1673>
________________________________________________




More information about the devel mailing list