Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-e2fsprogs: 提交

external/e2fsprogs


Commit MetaInfo

修订版654f5f5af819a21076363b6c97632735c2581670 (tree)
时间2018-08-04 03:58:40
作者Jeff Sharkey <jsharkey@andr...>
Commiterandroid-build-team Robot

Log Message

Ignore quotes in safe_print().

If the value being printed has embedded quotes ("), then printing
those quotes could confuse other tools when parsing the value.

This is the simplest CL to fix the security issue, and we can circle
back to think about more robust escaping in a future CL.

Bug: 80436257
Test: manual
Change-Id: Ica17f2c5701573bceafe34f20110d230a3925483
(cherry picked from commit efe90c297a8df591c051fdbfacb92b5283390bba)

更改概述

差异

--- a/misc/blkid.c
+++ b/misc/blkid.c
@@ -87,7 +87,9 @@ static void safe_print(const char *cp, int len)
8787 fputc('^', stdout);
8888 ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */
8989 }
90- fputc(ch, stdout);
90+ if (ch != '"') {
91+ fputc(ch, stdout);
92+ }
9193 }
9294 }
9395
Show on old repository browser