mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
Fix a buffer overrun on Linux/PPC64.
The buffer in realToMangleBuffer() is too small for a longdouble.
This commit is contained in:
@@ -2640,7 +2640,12 @@ void realToMangleBuffer(OutBuffer *buf, real_t value)
|
||||
buf->writestring("NAN"); // no -NAN bugs
|
||||
else
|
||||
{
|
||||
#if IN_LLVM
|
||||
// The buffer is too small for a longdouble on PPC.
|
||||
char buffer[36];
|
||||
#else
|
||||
char buffer[32];
|
||||
#endif
|
||||
int n = ld_sprint(buffer, 'A', value);
|
||||
assert(n > 0 && n < sizeof(buffer));
|
||||
for (int i = 0; i < n; i++)
|
||||
|
||||
Reference in New Issue
Block a user