FreeBSD Bugzilla – Attachment 101395 Details for
Bug 140855
astro/gpstk: reading dual frequency NovaTel data, buffer overflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
patch.shar
patch.shar (text/plain), 2.30 KB, created by
c.thomson
on 2009-11-25 04:09:07 UTC
(
hide
)
Description:
patch.shar
Filename:
MIME Type:
Creator:
c.thomson
Created:
2009-11-25 04:09:07 UTC
Size:
2.30 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># patch-lib-rxio-NovatelData.cpp ># patch-lib-rxio-NovatelData.hpp ># >echo x - patch-lib-rxio-NovatelData.cpp >sed 's/^X//' >patch-lib-rxio-NovatelData.cpp << '9055c5ae95537ffce7017347c450ad8a' >X--- lib/rxio/NovatelData.cpp.FCS 2009-11-24 09:08:46.000000000 +1100 >X+++ lib/rxio/NovatelData.cpp 2009-11-24 09:40:31.000000000 +1100 >X@@ -304,7 +304,9 @@ >X cout << "datasize:" << datasize << endl; >X >X // read the rest of the record >X- if(datasize-12 >= 1024) { >X+ // Note: OEM2 The Message byte count equals the total >X+ // length of the data block including the header. >X+ if(datasize >= sizeof(buffer)) { >X //FFStreamError fe("Read error - buffer overflow"); >X //GPSTK_THROW(fe); >X failure = 1; >X@@ -440,7 +442,8 @@ >X // --------------------------------------- >X // read the data message, but don't overwrite the header >X // first check against buffer overflow >X- if(datasize-28 >= 1024 || datasize-28 < 0) { >X+ // OEM4 total buffer usage = header+data >X+ if(datasize+28 >= sizeof(buffer)) { >X //FFStreamError fe("Read error - buffer overflow"); >X //GPSTK_THROW(fe); >X failure = 1; >9055c5ae95537ffce7017347c450ad8a >echo x - patch-lib-rxio-NovatelData.hpp >sed 's/^X//' >patch-lib-rxio-NovatelData.hpp << 'd17e545dcdfa01d94986b0d4e73c9e06' >X--- lib/rxio/NovatelData.hpp.FCS 2009-11-24 09:08:58.000000000 +1100 >X+++ lib/rxio/NovatelData.hpp 2009-11-24 09:09:34.000000000 +1100 >X@@ -165,7 +165,7 @@ >X >X private: >X /// private data members >X- unsigned char buffer[1024]; ///< buffer for raw data >X+ unsigned char buffer[2048]; ///< buffer for raw data >X >X /// Reference GPS week, for OEM2, where the nav records require a GPS week, >X /// but only the obs records have one, and then it is 10-bit. >d17e545dcdfa01d94986b0d4e73c9e06 >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 140855
:
101394
| 101395