提交 c4a0d51f authored 作者: noelgrandin's avatar noelgrandin

Fix potential UTF8 encoding issue in org.h2.store.FileStore, reported by Juerg Spiess

上级 52c49acb
...@@ -30,7 +30,8 @@ Change Log ...@@ -30,7 +30,8 @@ Change Log
</li><li>Fixed a deadlock related to very large temporary result sets. </li><li>Fixed a deadlock related to very large temporary result sets.
</li><li>Add "-list" command line option to Shell tool so that result-list-mode can be triggered when reading from a file </li><li>Add "-list" command line option to Shell tool so that result-list-mode can be triggered when reading from a file
</li><li>Issue 474: H2 Mysql Compatibility code fails to ignore "COMMENT" in CREATE TABLE, patch from Aaron Azeckoski </li><li>Issue 474: H2 Mysql Compatibility code fails to ignore "COMMENT" in CREATE TABLE, patch from Aaron Azeckoski
</li><liIssue 476: Broken link in jaqu.html </li><li>Issue 476: Broken link in jaqu.html
</li><li>Fix potential UTF8 encoding issue in org.h2.store.FileStore, reported by Juerg Spiess
</li></ul> </li></ul>
<h2>Version 1.3.172 (2013-05-25)</h2> <h2>Version 1.3.172 (2013-05-25)</h2>
......
...@@ -135,7 +135,7 @@ public class FileStore { ...@@ -135,7 +135,7 @@ public class FileStore {
* @return the random salt or the magic * @return the random salt or the magic
*/ */
protected byte[] generateSalt() { protected byte[] generateSalt() {
return HEADER.getBytes(); return HEADER.getBytes(Constants.UTF8);
} }
/** /**
...@@ -170,7 +170,7 @@ public class FileStore { ...@@ -170,7 +170,7 @@ public class FileStore {
public void init() { public void init() {
int len = Constants.FILE_BLOCK_SIZE; int len = Constants.FILE_BLOCK_SIZE;
byte[] salt; byte[] salt;
byte[] magic = HEADER.getBytes(); byte[] magic = HEADER.getBytes(Constants.UTF8);
if (length() < HEADER_LENGTH) { if (length() < HEADER_LENGTH) {
// write unencrypted // write unencrypted
checkedWriting = false; checkedWriting = false;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论