Skip to content

Commit 1e6322c

Browse files
authored
fixing truncation error
Alternative solution to rockchip-linux#67
1 parent 21cebf4 commit 1e6322c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ static bool saveEntry(FILE* outFile, char* path, rk_entry_type type,
15111511
static inline uint32_t convertChipType(const char* chip) {
15121512
char buffer[5];
15131513
memset(buffer, 0, sizeof(buffer));
1514-
snprintf(buffer, sizeof(buffer), "%s", chip);
1514+
memcpy(buffer, chip, sizeof(buffer));
15151515
return buffer[0] << 24 | buffer[1] << 16 | buffer[2] << 8 | buffer[3];
15161516
}
15171517

0 commit comments

Comments
 (0)