fix memory leak

CID40834
fix integer truncation

CID40832
fix overrun

CID40826
initialize pointer

CID40825
initialize signal mask

CID40824
fix memory leak

CID40823
fix leak

CID40822
fix leak

CID40821
fix leak

CID40820
fix leak

CID40819
ensure plugin buffer is null terminated

CID40818
fix leak

CID40826
CID40811
CID40810
CID40807
CID40804
CID40803
CID40802
CID40798
CID40796