The borrower will have to protect the lender from any loss of such entitlement. Therefore, if you have sold securities which have impending corporate action entitlements, you can either choose to leave the short position open and compensate the lender for such losses of entitlement or buy back the securities and return to the lender before the ex-date of the entitlement.