If helth_check_user length is greater than 32 byte, buffer over-run
was caused by strcpy(). It uses strncpy() instead of strcpy().
Patch contributed by Taiki Yamaguchi.
mysp.len = htonl(296);
mysp.sp.protoVersion = htonl(PROTO_MAJOR_V2 << 16);
strcpy(mysp.sp.database, "template1");
- strcpy(mysp.sp.user, pool_config.health_check_user);
+ strncpy(mysp.sp.user, pool_config.health_check_user, sizeof(mysp.sp.user) - 1);
*mysp.sp.options = '\0';
*mysp.sp.unused = '\0';
*mysp.sp.tty = '\0';