diff options
author | Michael Schroeder <mls@suse.de> | 2013-04-17 13:51:25 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-04-17 13:52:14 +0200 |
commit | b537fb8c2f2a3ae861b58f2ae60e2d8e000abd47 (patch) | |
tree | f31386f1945acb0905f8b4c315da882412e1c0dd /ext/repo_rpmdb.c | |
parent | 98171f702d71d884afcdc7f3a82a788a6442b8b6 (diff) | |
download | libsolv-b537fb8c2f2a3ae861b58f2ae60e2d8e000abd47.tar.gz libsolv-b537fb8c2f2a3ae861b58f2ae60e2d8e000abd47.tar.bz2 libsolv-b537fb8c2f2a3ae861b58f2ae60e2d8e000abd47.zip |
treat overlong utf8 sequences as error
Diffstat (limited to 'ext/repo_rpmdb.c')
-rw-r--r-- | ext/repo_rpmdb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index e84b8ec..c3fa5ec 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -372,13 +372,13 @@ setutf8string(Repodata *repodata, Id handle, Id tag, const char *str) { /* check for overlong sequences */ if ((c & 0x820823e0) == 0x80000000) - c = 0xfdffffff; + break; else if ((c & 0x020821f0) == 0x02000000) - c = 0xfff7ffff; + break; else if ((c & 0x000820f8) == 0x00080000) - c = 0xffffd000; + break; else if ((c & 0x0000207c) == 0x00002000) - c = 0xffffff70; + break; } } else |