aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Wilson <diegowilson@google.com>2020-06-26 00:50:11 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-26 00:50:11 +0000
commitf62739495a32cf31befc2f6af8220fb2c4994d36 (patch)
tree8092d81ddae8bbdfb74542f0428d30451211f1c4
parente8a1bf84d91953349b5bc2d2f97883355482808c (diff)
parent2914c624fd58df1a8f2990d30931a7bcb893d803 (diff)
downloadoj-libjdwp-f62739495a32cf31befc2f6af8220fb2c4994d36.tar.gz
Disallow input file write access to jdigen.py am: 091ceb2bb2 am: e638766f63 am: 8352906c00 am: 5f746c0bdf am: 2914c624fd
Original change: https://android-review.googlesource.com/c/platform/external/oj-libjdwp/+/1351023 Change-Id: I6617f4c577803190c46c734443e5d0f235aacf56
-rw-r--r--etc/jdigen.py2
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())