Bug 458287

Summary: Crashes with scanf("%ds") (d means an integer)
Product: [Applications] kdevelop Reporter: ybx332
Component: generalAssignee: kdevelop-bugs-null
Status: REPORTED ---    
Severity: crash CC: ybx332
Priority: NOR    
Version First Reported In: 5.8.220401   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description ybx332 2022-08-25 08:42:25 UTC
SUMMARY
When using scanf like scanf("%10s"), the program will crash immediately.

STEPS TO REPRODUCE
1. Create a new project
2. Enter the code
3. Crash

OBSERVED RESULT
Crash

EXPECTED RESULT
Work normally

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
May relate to clang, but I'm not sure.

libclang: crash detected during parsing: {
  'source_filename' : '/xxx/xxx/123.c' (contain the scanf code)
  'command_line_args' : ['clang', '-ferror-limit=100', '-fspell-checking', '', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c99', '-nostdinc', '-xc', '-Wno-gnu-zero-variadic-macro-arguments', '-isystem/usr/local/include', '-isystem/usr/include/x86_64-linux-gnu', '-isystem/usr/include', '-isystem', '/usr/lib/llvm-14/lib/clang/14.0.6/include', '-imacros', '/tmp/kdevelop.vlVBSJ'],
  'unsaved_files' : [],
  'options' : 781,