• In PKCS#7 padding $$paddingSize = n - (messageLenght \bmod n)$$ – kelalaka Feb 11 at 7:30
• Or are you using the openssl enc command, or an alias (in this case openssl aes-128-cbc)? That doesn't do plain encryption per the specs of AES and CBC; it does password-pased encryption using salt, which is added to the file and changes its size; see crypto.stackexchange.com/questions/3298/… (caveat: my answer) @kelalaka: and for len multiple of blocksize n that formula gives n (one block) as Q says – dave_thompson_085 Feb 12 at 7:39