Skip to content

Commit

Permalink
Immediately return in /status to avoid potential stack overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP authored and skylersaleh committed Jul 28, 2023
1 parent 4ed6906 commit 47bd97a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4476,6 +4476,9 @@ uint8_t* se_hcs_callback(const char* cmd, const char** params, uint64_t* result_
off+=snprintf(buffer+off,sizeof(buffer)-off,"- %s: %f\n",se_keybind_names[i],gui_state.hcs_joypad.inputs[i]);
}
str_result = buffer;
const char* result=strdup(str_result);
*result_size=strlen(result)+1;
return (uint8_t*)result;
}else if(strcmp(cmd,"/save")==0){
bool okay=false;;
while(*params){
Expand Down

0 comments on commit 47bd97a

Please sign in to comment.