From what I understand, a company is limited in the number of shares that they can purchase on the open market. Only 25% of the daily volume, and they have to buy them on the bid, not ask. Also, not during the first or last 30 minutes of trading.
I think this is accurate but I'm not 100% certain.
B