vlib: use malloc_noscan() where possible (#10465)

This commit is contained in:
Uwe Krüger 2021-06-15 13:47:11 +02:00 committed by GitHub
parent af60eba5e6
commit 60c880a0cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 56 additions and 83 deletions

View file

@ -126,7 +126,7 @@ pub fn (conn &Connection) tables(wildcard string) ?[]string {
// taking into account the current character set of the connection.
pub fn (conn &Connection) escape_string(s string) string {
unsafe {
to := malloc(2 * s.len + 1)
to := malloc_noscan(2 * s.len + 1)
C.mysql_real_escape_string_quote(conn.conn, to, s.str, s.len, `\'`)
return to.vstring()
}