Added code for checking the index of an array submit/tizen_2.2/20130714.151325
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 10 Jul 2013 01:29:54 +0000 (10:29 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 10 Jul 2013 14:33:22 +0000 (23:33 +0900)
packaging/libscl-ui.changes [new file with mode: 0644]
packaging/libscl-ui.spec
scl/include/sclversion.h
xmlresource/nine_patch_file_list_parser.cpp

diff --git a/packaging/libscl-ui.changes b/packaging/libscl-ui.changes
new file mode 100644 (file)
index 0000000..e69de29
index 97e6b80..97e78da 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:       libscl-ui
 Summary:    A library for developing XML-based software keyboards
-Version:    0.3.7
+Version:    0.3.8
 Release:    1
 Group:      TO BE / FILLED IN
 License:    TO BE / FILLED IN
index 0745469..7c2d3e3 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef __SCL_VERSION_H__
 #define __SCL_VERSION_H__
 
-#define SCL_VERSION "0.3.7-1"
+#define SCL_VERSION "0.3.8-1"
 
 #endif //__SCL_VERSION_H
 
index a2cdff9..42db7b3 100644 (file)
@@ -67,18 +67,20 @@ class NinePatchFileListParserImpl {
             while (cur_node != NULL) {
                 if (0 == xmlStrcmp(cur_node->name, (const xmlChar *)"file")) {
                     assert(m_size >= 0 && m_size < MAX_NINE_PATCH_FILE_LIST);
-                    m_nine_patch_file_list[m_size].image_path = (const char*)xmlNodeGetContent(cur_node);
-                    get_prop_number(cur_node, "left", &(m_nine_patch_file_list[m_size].left));
-                    get_prop_number(cur_node, "right", &(m_nine_patch_file_list[m_size].right));
-                    get_prop_number(cur_node, "top", &(m_nine_patch_file_list[m_size].top));
-                    get_prop_number(cur_node, "bottom", &(m_nine_patch_file_list[m_size].bottom));
-                    if (m_nine_patch_file_list[m_size].image_path == NULL) {
-                        SCLLOG(SclLog::ERROR, "NinePatchFileParser: image_path should be not NULL");
-                    }
-                    m_size++;
-                    if (m_size >= MAX_NINE_PATCH_FILE_LIST) {
-                        SCLLOG(SclLog::ERROR, "No Space for nine patch file list record.");
-                        break;
+                    if (m_size >= 0 && m_size < MAX_NINE_PATCH_FILE_LIST) {
+                        m_nine_patch_file_list[m_size].image_path = (const char*)xmlNodeGetContent(cur_node);
+                        get_prop_number(cur_node, "left", &(m_nine_patch_file_list[m_size].left));
+                        get_prop_number(cur_node, "right", &(m_nine_patch_file_list[m_size].right));
+                        get_prop_number(cur_node, "top", &(m_nine_patch_file_list[m_size].top));
+                        get_prop_number(cur_node, "bottom", &(m_nine_patch_file_list[m_size].bottom));
+                        if (m_nine_patch_file_list[m_size].image_path == NULL) {
+                            SCLLOG(SclLog::ERROR, "NinePatchFileParser: image_path should be not NULL");
+                        }
+                        m_size++;
+                        if (m_size >= MAX_NINE_PATCH_FILE_LIST) {
+                            SCLLOG(SclLog::ERROR, "No Space for nine patch file list record.");
+                            break;
+                        }
                     }
                 }