Currently we crash in mood.c due to an assertion.
if (mood_name) {
struct mood *m;
struct osl_row *row;
- struct osl_object obj = {
- .data = (char *)mood_name,
- .size = strlen(mood_name) + 1
- };
+ struct osl_object obj;
+
+ if (!*mood_name) {
+ *errmsg = make_message("empty mood name");
+ return -ERRNO_TO_PARA_ERROR(EINVAL);
+ }
+ obj.data = (char *)mood_name;
+ obj.size = strlen(mood_name) + 1;
ret = osl(osl_get_row(moods_table, BLOBCOL_NAME, &obj, &row));
if (ret < 0) {
if (errmsg)