diff options
author | Diego Wilson <diegowilson@google.com> | 2020-06-25 23:38:59 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-06-25 23:38:59 +0000 |
commit | 8352906c005d3a63af80f6bb4b01ae136e044f49 (patch) | |
tree | 8092d81ddae8bbdfb74542f0428d30451211f1c4 | |
parent | 1d6ffcfedea413d4b5151955a4ece23d4c4b38ec (diff) | |
parent | e638766f63f0ba718563b554372b119862cbc735 (diff) | |
download | oj-libjdwp-8352906c005d3a63af80f6bb4b01ae136e044f49.tar.gz |
Disallow input file write access to jdigen.py am: 091ceb2bb2 am: e638766f63
Original change: https://android-review.googlesource.com/c/platform/external/oj-libjdwp/+/1351023
Change-Id: I3046ca001ad629621754a420d3a62249fe922714
-rw-r--r-- | etc/jdigen.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/jdigen.py b/etc/jdigen.py index a5ba1a562..d8ce8afcc 100644 --- a/etc/jdigen.py +++ b/etc/jdigen.py @@ -51,7 +51,7 @@ public final class jdi extends ListResourceBundle {{ INSTANCE_FORMAT = '{{ "{key}", "{value}" }},\n' VALUES = "" -with open(args[1], 'r+') as inp: +with open(args[1], 'r') as inp: for l in inp.readlines(): key, value = l.split('=') VALUES += INSTANCE_FORMAT.format(key = key.strip(), value = value.strip()) |