Bug 427271 - Crash in Seexpr library in printf() when evaluating a script
Summary: Crash in Seexpr library in printf() when evaluating a script
Status: RESOLVED FIXED
Alias: None
Product: SeExpr
Classification: Frameworks and Libraries
Component: General (show other bugs)
Version: unspecified
Platform: Mint (Ubuntu based) Linux
: NOR crash
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-02 23:44 UTC by Tiar
Modified: 2020-10-05 14:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Crash log (from an appimage) (4.18 KB, text/plain)
2020-10-02 23:44 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2020-10-02 23:44:50 UTC
Created attachment 132078 [details]
Crash log (from an appimage)

SUMMARY
I got a crash in SeExpr while trying out printf() function.


STEPS TO REPRODUCE
1. Create a new document with SeExpr fill layer.
2. Paste: `$a = 5; $b = printf("a = %f", $a);`
3. Move cursor to just after %f, before the closing of the parenthesis.
4. Write ` %` and wait.

OBSERVED RESULT
Crash

EXPECTED RESULT
No crash :)

Krita

 Version: 4.4.0-beta2
 Languages: en_US, en, en_US, en, en_US, en, pl_PL, pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.12.9
  Version (loaded): 5.12.9

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.3.7-050307-generic
  Pretty Productname: Linux Mint 19.3
  Product Type: linuxmint
  Product Version: 19.3
  Desktop: X-Cinnamon
Comment 1 Tiar 2020-10-02 23:45:20 UTC
Assigning to amyspark.
Comment 2 amyspark 2020-10-03 22:39:32 UTC
Git commit a77cbfd7ea288c926007e09073cf7bccff4f5906 by L. E. Segovia.
Committed on 03/10/2020 at 17:14.
Pushed by lsegovia into branch 'master'.

Fix printf format validation

M  +6    -0    src/SeExpr2/ErrorCode.h
M  +44   -6    src/SeExpr2/ExprBuiltins.cpp
M  +7    -1    src/SeExpr2/UI/ErrorMessages.cpp
M  +13   -1    src/demos/imageEditor/imageEditor.cpp

https://invent.kde.org/graphics/seexpr/commit/a77cbfd7ea288c926007e09073cf7bccff4f5906