Bug 182198 - server writing to read-only string constants
server writing to read-only string constants
Product: 389
Classification: Community
Component: Directory Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rich Megginson
Orla Hegarty
Depends On: 182201
Blocks: 183369
  Show dependency treegraph
Reported: 2006-02-20 17:53 EST by Rich Megginson
Modified: 2007-04-18 13:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-10 18:04:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rich Megginson 2006-02-20 17:53:27 EST
views.c and windows_protocol_util.c use slapi_str2filter() with a constant
string argument, but that function writes to its argument.
Comment 1 Rich Megginson 2006-02-20 17:59:35 EST
Cannot pass const strings into slapi_str2filter, since it can modify
the contents.  I'm not sure why we haven't caught this earlier, but
I believe it has something to do with the patch to make ds build on
Fedora Core 4 with gcc4.  To do that, we turn off the -fwriteable-strings
argument to gcc.  I suppose with it on, it moves those strings to
some sort of writeable memory location.  With it off, constant strings
are definitely in the data section.  There was one place in views that
used a constant string, and a couple of places in the windows sync code.

revision 1.7
+++ views.c	22 Nov 2005 03:40:14 -0000	1.7

revision 1.23
+++ windows_protocol_util.c	22 Nov 2005 03:40:08 -0000	1.23

Note You need to log in before you can comment on or make changes to this bug.