diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c index 2619541502e..81f9fcbcddd 100644 --- a/Modules/rgbimgmodule.c +++ b/Modules/rgbimgmodule.c @@ -249,7 +249,7 @@ sizeofimage(self, args) if (!PyArg_Parse(args, "s", &name)) return NULL; - inf = fopen(name, "rw"); + inf = fopen(name, "rb"); if (!inf) { PyErr_SetString(ImgfileError, "can't open image file"); return NULL;