Skip to content

Commit ba46831

Browse files
committed
Make the no-eval adt parser the default
1 parent 2f6c2ac commit ba46831

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/bap/bir.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from collections import Sequence,Mapping
66
from .adt import *
77
from .bil import *
8+
from . import noeval_parser
89

910

1011
class Project(ADT) :
@@ -363,4 +364,4 @@ def parse_addr(str):
363364

364365
def loads(s):
365366
"loads bir object from string"
366-
return eval(s)
367+
return noeval_parser.parser(s)

src/bap/noeval_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import sys
99
import time
1010

11-
from . import bir
11+
# NOTE: uses bap.bir, but cannot import at module level (circular references)
1212

1313

1414
def toint(string, start, end):

0 commit comments

Comments
 (0)