Segfault in python-shout binding

Adam Sloboda <[email protected]>
Newsgroups gmane.comp.audio.icecast.devel
Message-ID <8762f1v0oc.wl%[email protected]>
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

_______________________________________________
Icecast-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/icecast-dev
shout.c.diff (text/plain, 315 B)
--- 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))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.