| 1 | Fix a bug whereby 'mformat' could end up passing uninitialized bytes |
| 2 | to write(2). This could be reproduced with: |
| 3 | |
| 4 | mformat -C -f 1440 -L 16 -N 77777777 -i /tmp/x :: |
| 5 | |
| 6 | where the output of /tmp/x would be non-deterministic. |
| 7 | |
| 8 | Patch by Ludovic Courtès <[email protected]>. |
| 9 | |
| 10 | |
| 11 | |
| 12 | void mformat(int argc, char **argv, int |
| 13 | |
| 14 | char *endptr; |
| 15 | |
| 16 | + memset(&boot.bytes, '\0', sizeof boot); |
| 17 | hs = hs_set = 0; |
| 18 | argtracks = 0; |
| 19 | argheads = 0; |
| 20 |