summaryrefslogtreecommitdiff
path: root/host/lib/crossystem.c
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/crossystem.c')
-rw-r--r--host/lib/crossystem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index b4824332..b4962591 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -3,6 +3,7 @@
* found in the LICENSE file.
*/
+#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
@@ -69,7 +70,7 @@ typedef enum VbBuildOption {
/* Return true if the FWID starts with the specified string. */
int FwidStartsWith(const char *start) {
- char fwid[128];
+ char fwid[VB_MAX_STRING_PROPERTY];
if (!VbGetSystemPropertyString("fwid", fwid, sizeof(fwid)))
return 0;
@@ -492,7 +493,8 @@ int VbGetSystemPropertyInt(const char* name) {
}
-const char* VbGetSystemPropertyString(const char* name, char* dest, int size) {
+const char* VbGetSystemPropertyString(const char* name, char* dest,
+ size_t size) {
static const char unknown_string[] = "unknown";
/* Check architecture-dependent properties first */