[pacman-dev] [PATCH] avoid segfaults whet calling alpm_option_get_* without previously calling alpm_initialize()

Stefano Esposito stefano.esposito87 at gmail.com
Tue Sep 11 16:27:55 EDT 2007


When calling a function of the alpm_option_get_* group, you get a segfault if you don't call alpm_initialize() first. With this patch those functions set pm_errno to PM_ERR_HANDLE_NULL and return an error value if handle == NULL. Patch attached

Signed-off-by: Stefano Esposito <stefano.esposito87 at gmail.com>
---
  lib/libalpm/handle.c |  165 ++++++++++++++++++++++++++++++++++++++++++++------
  1 files changed, 146 insertions(+), 19 deletions(-)

-- 
Stefano Esposito <stefano.esposito87 at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avoid_segfaults.patch
Type: application/octet-stream
Size: 4866 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20070911/0436b058/attachment.obj>


More information about the pacman-dev mailing list