]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
Log file name becomes invalid after a rotation
authorJohn Wolfe <jwolfe@vmware.com>
Fri, 22 Jan 2021 20:25:40 +0000 (12:25 -0800)
committerJohn Wolfe <jwolfe@vmware.com>
Fri, 22 Jan 2021 20:25:40 +0000 (12:25 -0800)
commitd65ad41e69517cbd2ef653b30ddcfca528b835c3
treeb09800950603b1c92bb3d1bef8bd4da033223b37
parent462c995f2deeaa578792b65c22eb082b9f487305
Log file name becomes invalid after a rotation

This is because the accounting is done unsigned but the printf used (in
multiple places) was "%d".  Fix this by using "%u".

As documented in the function header, the wrap around case was not handled
properly, so this was fixed as well.  If the maximum rotation number hits
MAX_UINT32, all of the files are renamed to pack the files as if this was
the beginning of a rotation sequence.
open-vm-tools/lib/file/file.c