This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 182198 - server writing to read-only string constants
server writing to read-only string constants
Status: CLOSED NEXTRELEASE
Product: 389
Classification: Community
Component: Directory Server (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rich Megginson
Orla Hegarty
1.0.2
:
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:
Environment:
Last Closed: 2006-03-10 18:04:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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.

/cvs/dirsec/ldapserver/ldap/servers/plugins/views/views.c,v
revision 1.7
+++ views.c	22 Nov 2005 03:40:14 -0000	1.7

/cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v
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.