]> git.saurik.com Git - android/aapt.git/commitdiff
Change buf size holding integer in ResourceTable
authorKenny Root <kroot@google.com>
Thu, 18 Feb 2010 17:43:08 +0000 (09:43 -0800)
committerKenny Root <kroot@google.com>
Thu, 18 Feb 2010 17:44:35 +0000 (09:44 -0800)
A 32-bit integer can be 10 characters long plus a byte for \0 at the
end.

Change-Id: I58040fe6e1674e78bcc6e07463ff36fb26e280f4

ResourceTable.cpp

index a389bfb52f61ff78cde2468195032664004f427b..0b531c228ad3b9bc9bfa8f57cf0a634bd97d962b 100644 (file)
@@ -382,7 +382,7 @@ static status_t compileAttribute(const sp<AaptFile>& in,
         }
         attr.createIfNeeded(outTable);
         if (!attr.hasErrors) {
-            char buf[10];
+            char buf[11];
             sprintf(buf, "%d", l10n_required);
             err = outTable->addBag(attr.sourcePos, myPackage, attr16, attr.ident,
                     String16(""), String16("^l10n"), String16(buf), NULL, NULL);