Skip to contentSkip to conversation

conf: Use ino64_t to save and compare inode numbers

DISCUSSION GitHub pull_request - opened 1 participant 1 message May 25, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

alsa-project/alsa-lib pull request #231 was opened from smcv:

On 32-bit platforms when not using the large-file-support ABI, struct stat64 contains ino64_t which is 64-bit, while ino_t is only 32-bit.

snd_config_update_r() checks whether a file has been replaced by saving the ino member of a struct stat64 and comparing it with a previously-saved inode number. On 32-bit platforms, assigning the 64-bit member of struct stat64 to a 32-bit member of struct finfo will truncate it modulo 1<<32, which could conceivably result in libasound not reloading configuration when it should (although the inode number space is large enough to make this failure mode highly unlikely).

---

This is from source code inspection while looking at #223, I haven't seen a genuine user-observable bug result from this.

cc @dos1, @perexg, @bertogg

Request URL : https://github.com/alsa-project/alsa-lib/pull/231
Patch URL : https://github.com/alsa-project/alsa-lib/pull/231.patch
Repository URL: https://github.com/alsa-project/alsa-lib