mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Fixed invalid memory access
This commit is contained in:
parent
7d40dfddb2
commit
89947851fd
@ -507,16 +507,16 @@ bool NMEAParser::parse(QFile *file, QList<TrackData> &tracks,
|
|||||||
|
|
||||||
if (validSentence(line, len)) {
|
if (validSentence(line, len)) {
|
||||||
if (!memcmp(line + 3, "RMC,", 4)) {
|
if (!memcmp(line + 3, "RMC,", 4)) {
|
||||||
if (!readRMC(track, line + 7, len))
|
if (!readRMC(track, line + 7, len - 7))
|
||||||
return false;
|
return false;
|
||||||
} else if (!memcmp(line + 3, "GGA,", 4)) {
|
} else if (!memcmp(line + 3, "GGA,", 4)) {
|
||||||
if (!readGGA(track, line + 7, len))
|
if (!readGGA(track, line + 7, len - 7))
|
||||||
return false;
|
return false;
|
||||||
} else if (!memcmp(line + 3, "WPL,", 4)) {
|
} else if (!memcmp(line + 3, "WPL,", 4)) {
|
||||||
if (!readWPL(waypoints, line + 7, len))
|
if (!readWPL(waypoints, line + 7, len - 7))
|
||||||
return false;
|
return false;
|
||||||
} else if (!memcmp(line + 3, "ZDA,", 4)) {
|
} else if (!memcmp(line + 3, "ZDA,", 4)) {
|
||||||
if (!readZDA(line + 7, len))
|
if (!readZDA(line + 7, len - 7))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user