Commits

Anonymous committed 0b0d4c3

Avoid crash if get_oper_name() somehow gave no {} for local oper.

Comments (0)

Files changed (1)

 			 */
 			rb_strlcpy(operbuf, aconf->info.oper, sizeof buf);
 			p = strrchr(operbuf, '{');
-			if (operbuf + sizeof operbuf - p > (ptrdiff_t)(melen + 2))
+			if (p != NULL &&
+					operbuf + sizeof operbuf - p > (ptrdiff_t)(melen + 2))
 			{
 				memcpy(p + 1, me.name, melen);
 				p[melen + 1] = '}';