File pidgin-CVE-2013-0273.patch of Package pidgin

# HG changeset patch
# User Mark Doliner <mark@kingant.net>
# Date 1360573907 28800
# Node ID c31cf8de31cd391dd1b647ba63ec68bfe262589f
# Parent  879db2a9a59c5f0bd1007fd89271092932315a65
Fix a crash in Sametime when a malicious server sends us an abnormally
long user ID.

This is CVE-2013-0273.

The problem was detected by Coverity static analysis and fixed by
Daniel Atallah.

diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -4977,7 +4977,7 @@
      data. wtf? */
 
   static char buf[BUF_LEN];
-  strncpy(buf, id, sizeof(buf));
+  g_strlcpy(buf, id, sizeof(buf));
   return buf;
 }
 

openSUSE Build Service is sponsored by