|
Lines 1245-1250
Link Here
|
| 1245 |
void |
1245 |
void |
| 1246 |
slc_add_reply (unsigned char func, unsigned char flags, cc_t value) |
1246 |
slc_add_reply (unsigned char func, unsigned char flags, cc_t value) |
| 1247 |
{ |
1247 |
{ |
|
|
1248 |
if (slc_replyp + 3 >= slc_reply + sizeof(slc_reply)) { |
| 1249 |
printf("slc_add_reply: not enough room\n"); |
| 1250 |
return; |
| 1251 |
} |
| 1248 |
if ((*slc_replyp++ = func) == IAC) |
1252 |
if ((*slc_replyp++ = func) == IAC) |
| 1249 |
*slc_replyp++ = IAC; |
1253 |
*slc_replyp++ = IAC; |
| 1250 |
if ((*slc_replyp++ = flags) == IAC) |
1254 |
if ((*slc_replyp++ = flags) == IAC) |
|
Lines 1258-1263
Link Here
|
| 1258 |
{ |
1262 |
{ |
| 1259 |
int len; |
1263 |
int len; |
| 1260 |
|
1264 |
|
|
|
1265 |
if (slc_replyp + 2 >= slc_reply + sizeof(slc_reply)) { |
| 1266 |
printf("slc_end_reply: not enough room\n"); |
| 1267 |
return; |
| 1268 |
} |
| 1261 |
*slc_replyp++ = IAC; |
1269 |
*slc_replyp++ = IAC; |
| 1262 |
*slc_replyp++ = SE; |
1270 |
*slc_replyp++ = SE; |
| 1263 |
len = slc_replyp - slc_reply; |
1271 |
len = slc_replyp - slc_reply; |
|
Lines 1416-1422
Link Here
|
| 1416 |
{ |
1424 |
{ |
| 1417 |
int len; |
1425 |
int len; |
| 1418 |
unsigned char *p; |
1426 |
unsigned char *p; |
|
|
1427 |
/* Pointer wrap should be no issue here */ |
| 1419 |
opt_replyend += OPT_REPLY_SIZE; |
1428 |
opt_replyend += OPT_REPLY_SIZE; |
|
|
1429 |
opt_replyend += strlen(ep); |
| 1430 |
if (vp) |
| 1431 |
opt_replyend += strlen(vp); |
| 1420 |
len = opt_replyend - opt_reply; |
1432 |
len = opt_replyend - opt_reply; |
| 1421 |
p = (unsigned char *) realloc (opt_reply, len); |
1433 |
p = (unsigned char *) realloc (opt_reply, len); |
| 1422 |
if (p == NULL) |
1434 |
if (p == NULL) |