Skip to content

Commit

Permalink
Merge pull request #112 from Thermi/stringop-truncation
Browse files Browse the repository at this point in the history
Do not overwrite final byte of array to make sure it's always zero
  • Loading branch information
9EOR9 committed Jun 26, 2019
2 parents 5e5bb66 + fe117c1 commit 808f48a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/pvio/pvio_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ my_bool pvio_socket_connect(MARIADB_PVIO *pvio, MA_PVIO_CINFO *cinfo)
/* Abstract socket */
if (cinfo->unix_socket[0] == '@')
{
strncpy(UNIXaddr.sun_path + 1, cinfo->unix_socket + 1, 107);
strncpy(UNIXaddr.sun_path + 1, cinfo->unix_socket + 1, 106);
port_length+= offsetof(struct sockaddr_un, sun_path);
}
else
Expand Down

0 comments on commit 808f48a

Please sign in to comment.