Improve sscanf safety.

This commit is contained in:
Steveice10 2017-07-21 15:18:29 -07:00
parent 9e8e959e75
commit a711e3e39b

View File

@ -611,10 +611,10 @@ void ui_draw_titledb_info(ui_view* view, void* data, float x1, float y1, float x
ui_draw_meta_info(view, &info->meta, x1, y1, x2, y2);
char updatedDate[32];
char updatedTime[32];
char updatedDate[32] = "";
char updatedTime[32] = "";
sscanf(info->updatedAt, "%[^T]T%[^Z]Z", updatedDate, updatedTime);
sscanf(info->updatedAt, "%31[^T]T%31[^Z]Z", updatedDate, updatedTime);
char infoText[512];