Fix [Issue#38]

diff --git a/release-notes/VERSION b/release-notes/VERSION
index 04d4733..cbc5154 100644
--- a/release-notes/VERSION
+++ b/release-notes/VERSION
@@ -1,7 +1,7 @@
-Version: 1.9.11
+Version: 1.9.12
 
 Release date:
-  06-Nov-2012
+  xx-Dec-2012
 
 Description:
   Another patch release for 1.9.
@@ -11,6 +11,9 @@
 * [JACKSON-875]: Enums are not properly serialized when
   Feature.USE_ANNOTATIONS is disabled
  (reported by Laurent P)
+* [Issue#38]: Infinite loop in `JsonParser.nextFieldName()` with trailing
+ space after field name
+ (reported by matjazs@github)
 
 ------------------------------------------------------------------------
 === History: ===
diff --git a/src/java/org/codehaus/jackson/impl/Utf8StreamParser.java b/src/java/org/codehaus/jackson/impl/Utf8StreamParser.java
index 981001c..2c3db93 100644
--- a/src/java/org/codehaus/jackson/impl/Utf8StreamParser.java
+++ b/src/java/org/codehaus/jackson/impl/Utf8StreamParser.java
@@ -2359,6 +2359,7 @@
                 switch (i) {
                 case INT_SPACE:
                 case INT_TAB:
+                    break;
                 case INT_CR:
                     _skipCR();
                     break;
@@ -2374,11 +2375,11 @@
                     }
                     break space_loop;
                 }
+                if (_inputPtr >= _inputEnd) {
+                    loadMoreGuaranteed();
+                }
+                i = _inputBuffer[_inputPtr++] & 0xFF;
             }
-            if (_inputPtr >= _inputEnd) {
-                loadMoreGuaranteed();
-            }
-            i = _inputBuffer[_inputPtr++] & 0xFF;
             if (i != INT_COLON) {
                 _reportUnexpectedChar(i, "was expecting a colon to separate field name and value");
             }