diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-07-30 09:55:47 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-07-30 09:55:47 +0100 |
commit | 6d9dd5fb9d0e9f4a174f53a0e20a39fbe809c71e (patch) | |
tree | a60591188270f2ec5ade8eef780b26da5ddf0efd /block | |
parent | 18a398f6a39df4b08ff86ac0d38384193ca5f4cc (diff) | |
parent | ba891d68b4ff17faaea3d3a8bfd82af3eed0a134 (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qobject-2018-07-27-v2' into staging
QObject patches for 2018-07-27 (3.0.0-rc3)
# gpg: Signature made Sat 28 Jul 2018 08:10:39 BST
# gpg: using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qobject-2018-07-27-v2:
qstring: Move qstring_from_substr()'s @end one to the right
qstring: Assert size calculations don't overflow
qstring: Fix qstring_from_substr() not to provoke int overflow
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/blkdebug.c | 2 | ||||
-rw-r--r-- | block/blkverify.c | 2 | ||||
-rw-r--r-- | block/nbd.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c index 0457bf5b66..0759452925 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -305,7 +305,7 @@ static void blkdebug_parse_filename(const char *filename, QDict *options, if (c != filename) { QString *config_path; - config_path = qstring_from_substr(filename, 0, c - filename - 1); + config_path = qstring_from_substr(filename, 0, c - filename); qdict_put(options, "config", config_path); } diff --git a/block/blkverify.c b/block/blkverify.c index da97ee5927..89bf4386e3 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -80,7 +80,7 @@ static void blkverify_parse_filename(const char *filename, QDict *options, } /* TODO Implement option pass-through and set raw.filename here */ - raw_path = qstring_from_substr(filename, 0, c - filename - 1); + raw_path = qstring_from_substr(filename, 0, c - filename); qdict_put(options, "x-raw", raw_path); /* TODO Allow multi-level nesting and set file.filename here */ diff --git a/block/nbd.c b/block/nbd.c index b198ad775f..e87699fb73 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -109,7 +109,7 @@ static int nbd_parse_uri(const char *filename, QDict *options) /* strip braces from literal IPv6 address */ if (uri->server[0] == '[') { host = qstring_from_substr(uri->server, 1, - strlen(uri->server) - 2); + strlen(uri->server) - 1); } else { host = qstring_from_str(uri->server); } |