[Icecast-dev] Segfault in python-shout binding

Adam Sloboda ja at disorder.sk
Mon Feb 20 10:28:01 PST 2012


Hi All,

I want to report a bug in python binding for libshout.  It happens on
amd64 architecture because of size_t type where int is expected in
PyArg_ParseTuple():

"s#" (string, Unicode or any read buffer compatible object) [const char *, int]
http://docs.python.org/release/2.5.2/api/arg-parsing.html

I'm attaching a patch which fixed it.  The shoutpy binding is not affected.

Regards,
Adam

-------------- next part --------------
--- shout.c.orig	2008-09-10 09:40:25.000000000 +0200
+++ shout.c	2012-02-20 18:50:03.750298135 +0100
@@ -393,7 +393,7 @@
 
 static PyObject* pshoutobj_send(ShoutObject* self, PyObject* args) {
   const unsigned char* data;
-  size_t len;
+  int len;
   int res;
 
   if (!PyArg_ParseTuple(args, "s#", &data, &len))


More information about the Icecast-dev mailing list