libxl__domain_rename() unconditionally dereferences its new_name
parameter, to check whether it is an empty string. Add a check to
avoid a segfault if new_name is null.
Signed-off-by: Euan Harris <euan.harris@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
}
}
+ if (!new_name) {
+ LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+ "new domain name not specified");
+ rc = ERROR_INVAL;
+ goto x_rc;
+ }
+
if (new_name[0]) {
/* nonempty names must be unique */
uint32_t domid_e;