diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-17 22:16:55 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-17 22:16:55 (GMT) |
| commit | a9cce88be619c2296080b3eaa896595dac80d452 (patch) | |
| tree | 42ab8f772787c4e4fcdb8fb669e1b042f32b36c2 /src/interface/RichLabel.cpp | |
| parent | 5b51e670447ea175fb9b0b7035403b274e16972e (diff) | |
| download | powder-a9cce88be619c2296080b3eaa896595dac80d452.zip powder-a9cce88be619c2296080b3eaa896595dac80d452.tar.gz | |
Fix crash when creating null terminator in updateRichText (writing out of bounds)
Diffstat (limited to 'src/interface/RichLabel.cpp')
| -rw-r--r-- | src/interface/RichLabel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interface/RichLabel.cpp b/src/interface/RichLabel.cpp index c93e217..84dc500 100644 --- a/src/interface/RichLabel.cpp +++ b/src/interface/RichLabel.cpp @@ -55,7 +55,7 @@ void RichLabel::updateRichText() int originalTextPos = 0; char * originalText = new char[textSource.length()+1]; std::copy(textSource.begin(), textSource.end(), originalText); - originalText[textSource.length()+1] = 0; + originalText[textSource.length()] = 0; int stackPos = -1; RichTextRegion * regionsStack = new RichTextRegion[256]; |
