diff options
author | Amulya Kumar Sahoo <amulya349@gmail.com> | 2014-05-30 11:47:08 +0530 |
---|---|---|
committer | Amulya Kumar Sahoo <amulya349@gmail.com> | 2014-05-30 11:47:08 +0530 |
commit | 2f98fe16d79170f6962f681295636a5c4fe010d4 (patch) | |
tree | 220ffae207f2fe6b8542cc98fc3c6cb46add0059 /bootloaders/caterina/Leonardo-prod-firmware-2012-04-26.hex | |
parent | 43a8a0f433e3f1971cf1af62b0386fd7c3c786e6 (diff) |
Fix of a bug
Stream::find(char *target) passes NULL as “terminator” to Stream::findUntil(char *target, char *terminator), which immediately dereferences it by passing it on to strlen() :
bool Stream::find(char *target)
{
return findUntil(target, NULL);
}
// as find but search ends if the terminator string is found
bool Stream::findUntil(char *target, char *terminator)
{
return findUntil(target, strlen(target), terminator, strlen(terminator));
}
Diffstat (limited to 'bootloaders/caterina/Leonardo-prod-firmware-2012-04-26.hex')
0 files changed, 0 insertions, 0 deletions