byronhe

Results 14 issues of byronhe

fix 编译错误

fix warning : ``` include/thulac.h:348:19: 警告:返回了对局部变量的‘output’的引用 [-Wreturn-local-addr] THULAC_result output; ^ ```

看了下这个方案的 Java 代码,有几个问题: 1. https://github.com/wustrive2008/aes-rsa-java/blob/master/src/main/java/com/wustrive/aesrsa/util/RandomUtil.java 这个竟然用的是java.util.Random。 java.util.Random 不是密码学安全的! 2. "AES/ECB/PKCS5Padding"; AES绝对不要使用 ECB 模式! https://zh.wikipedia.org/wiki/%E5%9D%97%E5%AF%86%E7%A0%81%E7%9A%84%E5%B7%A5%E4%BD%9C%E6%A8%A1%E5%BC%8F 3. HMAC 用 javax.crypto.Mac 就行了 http://stackoverflow.com/questions/3208160/how-to-generate-an-hmac-in-java-equivalent-to-a-python-example 不需要自己实现。 楼主的实现冗余代码太多。 建议废掉 HMAC-MD5 和 HMAC-SHA1,这俩已经不安全了。 1. https://github.com/wustrive2008/aes-rsa-java/blob/master/src/main/java/com/wustrive/aesrsa/util/EncryptionUtil.java 这个提取一个 byte...

http://blog.mikemccandless.com/2011/03/lucenes-fuzzyquery-is-100-times-faster.html

1. ` rapidjson::Value* pb2jsonobject(const google::protobuf::Message* msg); ` 这个函数有 use-after-free bug。 2. json2field 中几处判断` json->GetType() != rapidjson::kNumberType` 之后就直接调用了 ` GetInt()/GetUint()/GetInt64()/GetUint64() ` ,这个判断不够严格,会直接 coredump。应该严格用 `IsInt()/IsUint/IsInt65/IsUint64` 。

``` bash find runtime/Cpp/runtime/ -regex '.*.\(cpp\|h\)$' -type f -executable -exec chmod a-x {} \; ```