Skip to content

Commit

Permalink
Fixed buffer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hjd1964 authored Feb 20, 2021
1 parent 861b5b6 commit 0bbf315
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/Ethernet/Control.ino
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ void processControlGet() {
if (v!="") {
if ( (atoi2((char *)v.c_str(),&i)) && ((i>=2016) && (i<=9999))) {
get_temp_year=i-2000;
char temp[10];
char temp[16];
sprintf(temp,":SC%02d/%02d/%02d#",get_temp_month,get_temp_day,get_temp_year);
commandBool(temp);
}
Expand All @@ -494,7 +494,7 @@ void processControlGet() {
if (v!="") {
if ( (atoi2((char *)v.c_str(),&i)) && ((i>=0) && (i<=59))) {
get_temp_second=i;
char temp[10];
char temp[16];
sprintf(temp,":SL%02d:%02d:%02d#",get_temp_hour,get_temp_minute,get_temp_second);
commandBool(temp);
}
Expand Down

0 comments on commit 0bbf315

Please sign in to comment.