Skip to content

Commit

Permalink
Fix buffer overflow for FORTIFY_SOURCE
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostNaN committed Oct 3, 2020
1 parent 17f0150 commit 079b369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/curses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void init_curses(recidia_setings *settings, recidia_data *data, recidia_sync *sy
plotHeightCap = settings->plot_height_cap;

float db = 20 * log10(plotHeightCap / 32768);
char dbCharArrayt[5];
char dbCharArrayt[10];
sprintf(dbCharArrayt, "%.1f", db);
string dbString(dbCharArrayt);

Expand Down

0 comments on commit 079b369

Please sign in to comment.