Skip to content

Commit 90cccb0

Browse files
committed
Fix null pointer dereference in css_error (#2370)
Originally reported by @MrTuxracer via HackerOne. Fixes #2369 Spec sass/sass-spec#1105
1 parent 0656fef commit 90cccb0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/parser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,6 +2869,7 @@ namespace Sass {
28692869
const char* end = this->end;
28702870
while (*end != 0) ++ end;
28712871
const char* pos = peek < optional_spaces >();
2872+
if (!pos) pos = position;
28722873

28732874
const char* last_pos(pos);
28742875
if (last_pos > source) {

0 commit comments

Comments
 (0)