Opened 15 years ago
Closed 12 years ago
#1304 closed defect (fixed)
Possible bug in constructor MgSelection (MgMap *map, CREFSTRING xmlSelectionString) triggered by empty xmlSelectionString
Reported by: | gabrimonfa | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 2.4 |
Component: | Server | Version: | 2.2.0 |
Severity: | trivial | Keywords: | haspatch |
Cc: | External ID: |
Description
I have mapguide 2.1.0 on Debian etch with apache (let's call it mapguide_apache) and php. In my setup main apache web server is configured to use mapguide_apache with proxy/reverseProxy directives.
If MgSelection (MgMap *map, CREFSTRING xmlSelectionString) is called with an empty xmlSelectionString (it happens when no elements are selected in the map), my main apache logs:
502 Proxy Error
while mapguide_apache logs
[notice] child pid 24438 exit signal Segmentation fault (11)
The server appears to continue without problems but I'm not sure since I have also sporadic crashes (without log entries...)
Attachments (3)
Change History (7)
comment:1 by , 15 years ago
by , 12 years ago
Attachment: | 1304.patch added |
---|
comment:3 by , 12 years ago
Keywords: | haspatch added |
---|---|
Milestone: | → 2.4 |
by , 12 years ago
Attachment: | 1304_v2.patch added |
---|
by , 12 years ago
Attachment: | 1304_v3.patch added |
---|
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The MgSelection constructor just delegates to its parent constructor, which internally calls the FromXml() method (http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp#L104)
From what I can see, it just assumes as though the selection string is not empty (it doesn't actually check for an empty string).
I guess the solution is to check for an empty string, but then what to do once we encounter an empty string? Do nothing (return)? Throw MG exception?