Permalink
Browse files

Fix a stack overflow in the C callback userNotificationCenter from hs…

….notify
  • Loading branch information...
cmsj committed Apr 10, 2018
1 parent 6d2dae7 commit f199351538d7b81bd4a01f349ddeb2e33e76d8e7
Showing with 2 additions and 2 deletions.
  1. +2 −2 extensions/notify/internal.m
@@ -158,11 +158,11 @@ - (void)userNotificationCenter:(NSUserNotificationCenter *)center
// NSLog(@"invoking callback handler") ;
if ([skin protectedCallAndError:@"hs.notify callback" nargs:2 nresults:0] == NO) {
lua_pop(skin.L, 1); // pop the hs.notify module
_lua_stackguard_exit(skin.L);
return;
}
// FIXME: Things have been pushed onto the Lua stack, we probably need some lua_pop()s here
lua_pop(skin.L, 1); // pop the hs.notify module
BOOL shouldWithdraw = [[notification.userInfo valueForKey:@"autoWithdraw"] boolValue] ;
if (notification.deliveryRepeatInterval != nil) shouldWithdraw = YES ;

0 comments on commit f199351

Please sign in to comment.