View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000084 | Volume 2 | Bug | public | 2019-05-13 16:48 | 2019-06-06 18:30 |
Reporter | anonymous | Assigned To | |||
Priority | low | Severity | crash | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Win32 | OS | OS Version | ||
Product Version | |||||
Target Version | Issue 2 | Fixed in Version | |||
Summary | 0000084: Mapserver crashes when attempting html export with -charinfo option (non-critical, resolution not needed for issue 1) | ||||
Description | During html exporting, a blank string is fed to a function which is not expecting one, which then crashes attempting to create a buffer | ||||
Steps To Reproduce | Start a server, make sure at least one mapserver is running Create a csv file under 'c:\charinfo\req\shard' (any filename so long as it is .csv) Inside the csv file, put the name of a valid character (in quotes if a space is in the name) as the only entry Run a new mapserver with the -charinfo command line option This mapserver will crash | ||||
Additional Information | Needs a one line fix as per attached diff to reject a string if the buffer size would be negative | ||||
Tags | No tags attached. | ||||
subsystem | |||||
|
CharInfo.diff (642 bytes)
Common/container/dbcontainerpack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Common/container/dbcontainerpack.c b/Common/container/dbcontainerpack.c index 70178e23..ea2fbb55 100644 --- a/Common/container/dbcontainerpack.c +++ b/Common/container/dbcontainerpack.c @@ -87,6 +87,7 @@ int decodeLine(char **buffptr,char *table,char *field,char **val_ptr,int *idx_pt // Copy a single line into a seperate buffer. end = strpbrk(buff, "\n\r" ); + if (end <= buff) { return 0; } // BW: Prevents a crash when charinfo passes us an empty string estrConcatFixedWidth(&local_buff, buff, end-buff); if (*end == '\r') end++; |