mirror of https://github.com/google/oss-fuzz.git
pyodbc: write .odbcinst.init file in /tmp/ (#9034)
This is in contrast to writing it in /etc/, which the fuzzer does not have permission to in the bots. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51308 Signed-off-by: David Korczynski <david@adalogics.com> Signed-off-by: David Korczynski <david@adalogics.com>
This commit is contained in:
parent
322be352aa
commit
fa2feb1b5c
|
@ -48,9 +48,10 @@ def TestOneInput(data):
|
||||||
def main():
|
def main():
|
||||||
# Write the odbcinst.ini file
|
# Write the odbcinst.ini file
|
||||||
dir_path = os.path.dirname(os.path.realpath(__file__))
|
dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
with open("/etc/odbcinst.ini", "w") as f:
|
with open("/tmp/odbcinst.ini", "w") as f:
|
||||||
f.write("[FUZZ]\n")
|
f.write("[FUZZ]\n")
|
||||||
f.write("Driver=%s/fuzzodbc.so\n"%(dir_path))
|
f.write("Driver=%s/fuzzodbc.so\n"%(dir_path))
|
||||||
|
os.environ['ODBCSYSINI'] = '/tmp/'
|
||||||
|
|
||||||
atheris.instrument_all()
|
atheris.instrument_all()
|
||||||
atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
|
atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
|
||||||
|
|
Loading…
Reference in New Issue