History

fix bounds check in screenputc() (thanks mischief)

cinap_lenrek committed 9 years ago

Commit 2f3f38b1 parent e10ae981 file · +1 −1Browse files

Unified · Split

kern/term.c+1−1
@@ -125,7 +125,7 @@ screenputc(char *buf) · 124 unmodified lines
125 static int *xp;125 static int *xp;
126 static int xbuf[256];126 static int xbuf[256];
127 127
128 if(xp < xbuf || xp >= &xbuf[sizeof(xbuf)])128 if(xp < xbuf || xp >= &xbuf[nelem(xbuf)])
129 xp = xbuf;129 xp = xbuf;
130 130
131 switch(buf[0]) {131 switch(buf[0]) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t