Skip to content

Instantly share code, notes, and snippets.

[Email]
match="Email(:[field]),"
rewrite="+ email(:[field])"
[NoValidation]
match="NoValidation(:[field]),"
rewrite="+ [|NoValidation({field: :[field]})|]"
[StringNonEmpty]
match="StringNonEmpty(:[field]),"
@rvantonder
rvantonder / all-inside-strlen.txt
Last active October 1, 2019 05:42
Code matches with addition inside `strlen` for the top ~100 GH repos. Searched for `strlen(:[x]+:[[y]])` and `strlen(:[x] + :[[y]])` with comby.
FFmpeg.git-2019-09-30-23-45-37/libavcodec/h264_metadata_bsf.c:strlen(ctx->sei_user_data + i + 1)
FFmpeg.git-2019-09-30-23-45-37/libavformat/ffmetadec.c:strlen(p + 1)
FFmpeg.git-2019-09-30-23-45-37/libavformat/libopenmpt.c:strlen(ext + 1)
curl.git-2019-09-30-23-46-33/lib/vtls/vtls.c:strlen(begin_pos + 8)
curl.git-2019-09-30-23-46-33/lib/socks.c:strlen((char *)socksreq + 8)
curl.git-2019-09-30-23-46-33/tests/server/getpart.c:strlen(*buffer + offset)
fastdfs.git-2019-10-01-00-16-06/client/client_func.c:strlen(fileExtName + 1)
git.git-2019-09-30-23-45-09/config.c:strlen(key + store->baselen + 1)
git.git-2019-09-30-23-45-09/connect.c:strlen(for_pos + 5)
git.git-2019-09-30-23-45-09/sha1-name.c:strlen(real_ref + 11)
@rvantonder
rvantonder / all-after-strlen.txt
Last active October 1, 2019 05:42
Code matches with addition after `strlen` for the top ~100 GH repos. Searched for `strlen(:[x])+:[[y]]` and `strlen(:[x]) + :[[y]]` with comby.
Arduino.git-2019-09-30-23-55-25/tools/sdk/lwip/src/core/mdns.c:strlen(PUCK_SERVICE) + 1
Arduino.git-2019-09-30-23-55-25/tools/sdk/lwip/src/core/mdns.c:strlen(tmpBuf) + MDNS_LENGTH_ADD
Arduino.git-2019-09-30-23-55-25/tools/sdk/lwip/src/core/mdns.c:strlen(tmpBuf) + MDNS_LENGTH_ADD
Arduino.git-2019-09-30-23-55-25/tools/sdk/lwip/src/core/mdns.c:strlen(PUCK_SERVICE) + 1
Arduino.git-2019-09-30-23-55-25/tools/sdk/lwip/src/core/mdns.c:strlen(tmpBuf) + MDNS_LENGTH_ADD
Arduino.git-2019-09-30-23-55-25/tools/sdk/lwip/src/core/mdns.c:strlen(tmpBuf) + MDNS_LENGTH_ADD
Arduino.git-2019-09-30-23-55-25/tools/sdk/lwip/src/core/mdns.c:strlen(name) + 3
BGAQRCode-Android.git-2019-10-01-00-08-03/zbar/src/main/jni/zbar/symbol.c:strlen(type) + strlen
BGAQRCode-Android.git-2019-10-01-00-08-03/zbar/src/main/jni/zbar/error.c:strlen(func) + sizeof
BGAQRCode-Android.git-2019-10-01-00-08-03/zbar/src/main/jni/zbar/error.c:strlen(err->detail) + 1
@rvantonder
rvantonder / c-without-macros.json
Last active September 30, 2019 21:01
Language definition for C without macros
{
"user_defined_delimiters":[
[
"(",
")"
],
[
"{",
"}"
],
@rvantonder
rvantonder / output.md
Last active September 24, 2019 17:46
SCB-fuzzgoat-null-derefs

Runtime is 4.527s

Partitioning...
Patch ./complete/fuzzgoat/ground-truth/GENERATED_T_HAT/p01.patch fixed: 15
./complete/fuzzgoat/ground-truth/hf/all/raw/id:000011,sig:11,src:000079,op:int8,pos:4,val:+0
./complete/fuzzgoat/ground-truth/hf/all/raw/id:000024,sig:11,src:000237,op:havoc,rep:4
./complete/fuzzgoat/ground-truth/hf/all/raw/id:000026,sig:11,src:000618,op:havoc,rep:2
./complete/fuzzgoat/ground-truth/hf/all/raw/id:000029,sig:11,src:000689,op:havoc,rep:8
./complete/fuzzgoat/ground-truth/hf/all/raw/id:000012,sig:11,src:000210,op:havoc,rep:2
package main
import "fmt"
func check_slice(x []int) {
if x != nil && len(x) != 0 {
fmt.Println(len(x))
}
}
#include <stdio.h>
int main() {
printf("Hello world.\n");
}
diff --git a/lib_test/bap_image/test_image.ml b/lib_test/bap_image/test_image.ml
index 665b48c..f69914b 100644
--- a/lib_test/bap_image/test_image.ml
+++ b/lib_test/bap_image/test_image.ml
@@ -136,6 +136,29 @@ let assert_cont ~word_size img =
(a1 <> a2 ==> Addr.is_zero diff) in
a2) |> return
+let empty_table = Bap_table.empty
+
diff --git a/.gitignore b/.gitignore
index 0d50f56..f8f1975 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,5 @@
/setup.log
/setup.ml
META
+*.swp
+*.merlin
diff --git a/.gitignore b/.gitignore
index f8f1975..0d50f56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,5 +14,3 @@
/setup.log
/setup.ml
META
-*.swp
-*.merlin