fixed buffer overrun problem when printing a char to an unbuffered

port is interrupted.
This commit is contained in:
Abdulaziz Ghuloum
2008-12-12 16:03:10 -05:00
parent 026fd6f446
commit f8efdfc848
3 changed files with 91 additions and 49 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ extend_table_maybe(ikptr p, unsigned long int size, ikpcb* pcb){
pcb->segment_vector = (unsigned int*)(long)(s - new_lo * pagesize);
pcb->memory_base = (new_lo * segment_size);
}
else if (q > pcb->memory_end){
else if (q >= pcb->memory_end){
unsigned long int lo = segment_index(pcb->memory_base);
unsigned long int old_hi = segment_index(pcb->memory_end);
unsigned long int new_hi = segment_index(q+segment_size-1);