Commit 2f30cd10 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Boost field buffer size - crashes when trying to draw very deep UTF-8 trees

Test by nesting 30 shells
Patch from ArchLinux. Closes #65.
parent a939cdf8
...@@ -469,7 +469,7 @@ static inline void Process_outputRate(RichString* str, int attr, char* buffer, i ...@@ -469,7 +469,7 @@ static inline void Process_outputRate(RichString* str, int attr, char* buffer, i
} }
static void Process_writeField(Process* this, RichString* str, ProcessField field) { static void Process_writeField(Process* this, RichString* str, ProcessField field) {
char buffer[128]; buffer[127] = '\0'; char buffer[256]; buffer[255] = '\0';
int attr = CRT_colors[DEFAULT_COLOR]; int attr = CRT_colors[DEFAULT_COLOR];
int baseattr = CRT_colors[PROCESS_BASENAME]; int baseattr = CRT_colors[PROCESS_BASENAME];
int n = sizeof(buffer) - 1; int n = sizeof(buffer) - 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment