We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
printk %s format dosen't print correct string
The text was updated successfully, but these errors were encountered:
/kernel/vsprintf.c 165 len = strlen(s); <------------------------- Buggy 166 if (precision < 0) 167 precision = len; 168 else if (len > precision) 169 len = precision; 170 171 if (!(flags & LEFT)) 172 while (len < field_width--) 173 *str++ = ' '; 174 for (i = 0; i < len; ++i) 175 *str++ = *s++; 176 while (len < field_width--) 177 *str++ = ' '; 178 break;
/kernel/vsprintf.dis 01 mov (%edi),%edi 02 mov $0xffffffff,%ecx 03 mov $0x0,%eax 04 cld 05 repnz scas %es:(%edi),%al 06 not %ecx 07 dec %ecx 08 mov 0x8(%esp),%eax 09 test %eax,%eax 10 js 3da <vsprintf+0x1cd> 11 cmp %eax,%ecx 12 jle 3da <vsprintf+0x1cd> 13 mov %eax,%ecx 14 test $0x10,%dl 15 je 416 <vsprintf+0x209> 16 test %ecx,%ecx 17 jle 3f6 <vsprintf+0x1e9> 18 mov $0x0,%eax 19 mov (%edi,%eax,1),%dl
In line 5, edi register's value is changed. But edi(corrupted) is used in line 19
Sorry, something went wrong.
No branches or pull requests
printk %s format dosen't print correct string
The text was updated successfully, but these errors were encountered: