diff --git a/src/plist.c b/src/plist.c
index 2f4990c..e8f6974 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -222,6 +222,9 @@
         int is_xml = 0;
         /* skip whitespace */
         SKIP_WS(plist_data, pos, length);
+        if (pos >= length) {
+            return PLIST_ERR_PARSE;
+        }
         if (plist_data[pos] == '<' && (length-pos > 3) && !isxdigit(plist_data[pos+1]) && !isxdigit(plist_data[pos+2]) && !isxdigit(plist_data[pos+3])) {
             is_xml = 1;
         } else if (plist_data[pos] == '[') {
@@ -233,19 +236,28 @@
             /* this could be json or openstep */
             pos++;
             SKIP_WS(plist_data, pos, length);
+            if (pos >= length) {
+                return PLIST_ERR_PARSE;
+            }
             if (plist_data[pos] == '"') {
                 /* still could be both */
                 pos++;
-                do {
+                while (pos < length) {
                     FIND_NEXT(plist_data, pos, length, '"');
                     if (plist_data[pos-1] != '\\') {
                         break;
                     }
                     pos++;
-                } while (pos < length);
+                }
+                if (pos >= length) {
+                    return PLIST_ERR_PARSE;
+                }
                 if (plist_data[pos] == '"') {
                     pos++;
                     SKIP_WS(plist_data, pos, length);
+                    if (pos >= length) {
+                        return PLIST_ERR_PARSE;
+                    }
                     if (plist_data[pos] == ':') {
                         /* this is definitely json */
                         is_json = 1;
