Bug 176851 - [patch] net-im/pidgin segmentation fault with cap plugin
Summary: [patch] net-im/pidgin segmentation fault with cap plugin
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-11 14:10 UTC by Ivan Klymenko
Modified: 2013-03-24 20:40 UTC (History)
0 users

See Also:


Attachments
file.diff (459 bytes, patch)
2013-03-11 14:10 UTC, Ivan Klymenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Klymenko 2013-03-11 14:10:00 UTC
when compiling the port encounter the following warnings:
..
cap.c: In function 'generate_prediction_for':
cap.c:46: warning: initialization makes integer from pointer without a cast
cap.c:97: warning: assignment makes integer from pointer without a cast
cap.c:99: warning: passing argument 1 of 'strcmp' makes pointer from integer without a cast
..

and occurs segmentation fault:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 80a806400 (LWP 101046/pidgin)]
0x000000080cb03ef1 in get_stats_for (buddy=<value optimized out>) at cap.c:99
99		if(sta_id && !strcmp(sta_id, "offline")) {

Fix: fixing in patch

Patch attached with submission follows:
How-To-Repeat: run pidgin
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-03-11 14:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marcus

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Ivan Klymenko 2013-03-11 14:22:45 UTC
so sorry, mechanically typo

s/pOidgin/pidgin/g
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-03-24 20:39:34 UTC
Author: marcus
Date: Sun Mar 24 20:39:21 2013
New Revision: 315159
URL: http://svnweb.freebsd.org/changeset/ports/315159

Log:
  Fix a crash with the cap plugin.
  
  PR:             176851
  Submitted by:   Ivan Klymenko <fidaj@ukr.net>

Added:
  head/net-im/libpurple/files/patch-pidgin_plugins_cap_cap.c   (contents, props changed)
Modified:
  head/net-im/pidgin/Makefile

Added: head/net-im/libpurple/files/patch-pidgin_plugins_cap_cap.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/libpurple/files/patch-pidgin_plugins_cap_cap.c	Sun Mar 24 20:39:21 2013	(r315159)
@@ -0,0 +1,11 @@
+--- pidgin/plugins/cap/cap.c.orig	2013-03-24 20:34:29.882262000 +0000
++++ pidgin/plugins/cap/cap.c	2013-03-24 20:34:39.576121000 +0000
+@@ -43,7 +43,7 @@ static double generate_prediction_for(Pu
+ 	int threshold = purple_prefs_get_int("/plugins/gtk/cap/threshold");
+ 	int min_minute = (current_minute - threshold) % 1440;
+ 	int max_minute = (current_minute + threshold) % 1440;
+-	char *sql, sta_id = NULL;
++	char *sql, *sta_id = NULL;
+ 	sqlite3_stmt *stmt = NULL;
+ 	const char *tail = NULL;
+ 	int rc;

Modified: head/net-im/pidgin/Makefile
==============================================================================
--- head/net-im/pidgin/Makefile	Sun Mar 24 20:26:48 2013	(r315158)
+++ head/net-im/pidgin/Makefile	Sun Mar 24 20:39:21 2013	(r315159)
@@ -7,7 +7,7 @@
 #
 
 PORTNAME=	pidgin
-PORTREVISION=	0
+PORTREVISION=	1
 
 MAINTAINER=	marcus@FreeBSD.org
 COMMENT=	Pidgin multi-protocol messaging client (GTK+ UI)
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Joe Marcus Clarke freebsd_committer freebsd_triage 2013-03-24 20:39:40 UTC
State Changed
From-To: open->closed

Committed, thanks!  Please make sure to push this patch upstream.