Skip to content

Commit 69ff414

Browse files
authored
Fix null pointer dereference in css_error (#2370)
Originally reported by @MrTuxracer via HackerOne. Fixes #2369 Spec sass/sass-spec#1105
1 parent 95f307e commit 69ff414

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
@@ -2893,6 +2893,7 @@ namespace Sass {
28932893
const char* end = this->end;
28942894
while (*end != 0) ++ end;
28952895
const char* pos = peek < optional_spaces >();
2896+
if (!pos) pos = position;
28962897

28972898
const char* last_pos(pos);
28982899
if (last_pos > source) {

0 commit comments

Comments
 (0)