diff Objects/unicodeobject.c @ 52036:8dbd1b96fa6b 2.5

Avoid potential for undefined variable 'startinpos' in PyUnicode_DecodeUTF7(). See issue #5389.
author Guido van Rossum <guido@python.org>
date Thu, 05 Mar 2009 21:47:33 +0000
parents 0aafd1ae5120
children 787b969d37f0
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Tue Dec 23 13:22:06 2008 +0000
+++ b/Objects/unicodeobject.c	Thu Mar 05 21:47:33 2009 +0000
@@ -1012,7 +1012,7 @@
                     }
                 } else if (SPECIAL(ch,0,0)) {
                     errmsg = "unexpected special character";
-	                goto utf7Error;
+	            goto utf7Error;
                 } else  {
                     *p++ = ch;
                 }
@@ -1036,9 +1036,10 @@
             }
         }
         else if (SPECIAL(ch,0,0)) {
+            startinpos = s-starts;
             errmsg = "unexpected special character";
             s++;
-	        goto utf7Error;
+            goto utf7Error;
         }
         else {
             *p++ = ch;