Add byte slice type

This commit is contained in:
intrigus
2020-03-27 15:37:36 +01:00
parent d609c0ca43
commit 21feb9d996
2 changed files with 5 additions and 6 deletions

View File

@@ -328,6 +328,11 @@ class SliceType extends @slicetype, CompositeType {
override string toString() { result = "slice type" }
}
/** A byte slice type */
class ByteSliceType extends SliceType {
ByteSliceType() { this.getElementType() instanceof Uint8Type }
}
/** A struct type. */
class StructType extends @structtype, CompositeType {
/**

View File

@@ -39,12 +39,6 @@ module XPathInjection {
XPathExpressionStringAsSink() { this instanceof XPath::XPathExpressionString::Range }
}
// TODO: This probably belongs somewhere, but I'm not sure where
/** The []byte type */
class ByteSliceType extends SliceType {
ByteSliceType() { this.getElementType() instanceof Uint8Type }
}
//TODO add runes?
/**
* A call to `filepath.Rel`, considered as a sanitizer for path traversal.