Quantcast
Channel: SparkFun Electronics Comments
Viewing all articles
Browse latest Browse all 44542

Customer #440738 on DEV-09521 - SerIO

$
0
0

I was looking through the source and think I found a problem with it, hoping someone can clarify.

line 167 – if(command_buffer_count == (2*MAX_COMMAND_LENGTH))return 0; //If the command is too long, exit the function

Why 2*MAX_COMMAND_LENGTH? Are you not going to write passed the end of command_buffer and possibly overwrite something, if a command longer than MAX_COMMAND_LENGTH is accidentally sent

should it not be

line 167 – if(command_buffer_count == (MAX_COMMAND_LENGTH))return 0; //If the command is too long, exit the function


Viewing all articles
Browse latest Browse all 44542

Trending Articles