Commit 12fd4ab
committed
loginrec: Make dstsize signed
dstsize was changed from int to size_t a long time ago, differing from
OpenSSH. This is not correct, since ((int)len - dstsize) will be
calculated with unsigned arithmetic and wrap, so "> 0" passes.
That leads to src going backwards into earlier logininfo struct.
Reported by @basavaraj-sm05 Basavaraj S Maneppagol
This partially reverts the CVS commit.
line_full_name() keeps "unsigned int" to avoid a signed comparison warning.
Revision 1.7 - (view) (download) (annotate) - [select for diffs]
Mon Jun 23 08:15:05 2003 UTC (23 years ago) by matt
Branch: MAIN
CVS Tags: RELEASE_0_34, RELEASE_0_35, RELEASE_0_36
Changes since 1.6: +4 -4 lines
Diff to previous 1.6
tidying, get rid of some signed/unsigned comparisons, other compiler warnings
(git conversion
e629f43)1 parent 7f5b313 commit 12fd4ab
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
0 commit comments