In the below code snippet the format string is kinda bad style and should be replaced by something more sensible.
|
(void)! fscanf(file, |
|
"%*32u %*32s %*1c %*32u %*32u %*32u %*32u %*32u %*32u %*32u " |
|
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u " |
|
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u " |
|
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u " |
|
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u " |
|
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u " |
|
"%*32u %*32u %32u %32u", |
|
&process->vpid, &process->ctid); |
Furthermore the size given (32) for most arguments is far outside of sensible values for %d (sensible values would be up to 20 when considering int to map to int64_t).
Is there any documentation to point to for the format of the file we try to read there from OpenVZ? Couldn't find anything relevant (also no OpenVZ available for testing).
In the below code snippet the format string is kinda bad style and should be replaced by something more sensible.
htop/linux/LinuxProcessList.c
Lines 499 to 507 in 9ee7256
Furthermore the size given (32) for most arguments is far outside of sensible values for
%d(sensible values would be up to 20 when consideringintto map toint64_t).Is there any documentation to point to for the format of the file we try to read there from OpenVZ? Couldn't find anything relevant (also no OpenVZ available for testing).