Thanks for this posting / providing this information. These messages are indeed caused by those two NASL scripts and not originating from some issues in GVM / the scanner so i have moved it into the Vulnerability Tests category.
Some background on both messages:
This is basically caused by a VT doing something like e.g.:
soc = open_sock_tcp(port);
close(sock); # Using sock instead of soc
This is nothing severe because the scanner will close such sockets opened by a NASL script on termination of that script anyway. But still NASL scripts should make sure to close all sockets as early as possible.
In this case the message is caused by something like e.g.:
Again this is nothing severe because substr() is just a little bit more verbose if too short data is passed. Basically a VT needs to do something like e.g. the following below before passing any data to substr():
if(!res || strlen(res) < 7)
Both message didn’t affected the functionality of these tests or the scan itself. Nonetheless such messages should be avoided where possible and an update to both NASL scripts will be published in the feeds in the next few days.