Skip to content

Commit

Permalink
bcache: defensively handle format strings
Browse files Browse the repository at this point in the history
Just to be safe, call the error reporting function with "%s" to avoid
any possible future format string leak.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
  • Loading branch information
Kees Cook authored and Kent Overstreet committed Nov 11, 2013
1 parent 5ceaaad commit c869494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/bcache/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,7 @@ static void run_cache_set(struct cache_set *c)
err:
closure_sync(&cl);
/* XXX: test this, it's broken */
bch_cache_set_error(c, err);
bch_cache_set_error(c, "%s", err);
}

static bool can_attach_cache(struct cache *ca, struct cache_set *c)
Expand Down

0 comments on commit c869494

Please sign in to comment.