[Python-checkins] r45304 - python/branches/release24-maint/Modules/socketmodule.c
armin.rigo
python-checkins at python.org
Wed Apr 12 14:04:11 CEST 2006
Author: armin.rigo
Date: Wed Apr 12 14:04:10 2006
New Revision: 45304
Modified:
python/branches/release24-maint/Modules/socketmodule.c
Log:
Backport of r45303: buffer overflow.
Modified: python/branches/release24-maint/Modules/socketmodule.c
==============================================================================
--- python/branches/release24-maint/Modules/socketmodule.c (original)
+++ python/branches/release24-maint/Modules/socketmodule.c Wed Apr 12 14:04:10 2006
@@ -1083,7 +1083,7 @@
addr = (struct sockaddr_un*)&(s->sock_addr).un;
if (!PyArg_Parse(args, "t#", &path, &len))
return 0;
- if (len > sizeof addr->sun_path) {
+ if (len >= sizeof addr->sun_path) {
PyErr_SetString(socket_error,
"AF_UNIX path too long");
return 0;
More information about the Python-checkins
mailing list