At least detect unexpected escape transposition characters
This commit is contained in:
parent
45df26382f
commit
fac432cdb4
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,8 @@ int patty_kiss_read(int fd, void *buf, size_t *len, int *channel) {
|
|||
((char *)buf)[b++] = PATTY_KISS_FEND;
|
||||
} else if (c == PATTY_KISS_TFESC) {
|
||||
((char *)buf)[b++] = PATTY_KISS_FESC;
|
||||
} else {
|
||||
goto error_io;
|
||||
}
|
||||
|
||||
flags &= ~KISS_ESCAPE;
|
||||
|
@ -53,4 +55,7 @@ int patty_kiss_read(int fd, void *buf, size_t *len, int *channel) {
|
|||
*len = b + 1;
|
||||
|
||||
return 0;
|
||||
|
||||
error_io:
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue