it seems that the BufferChecks.checkBufferSize(Buffer buf, int size) function does not take the Buffer kind into account.
Test code:
// create the buffer: 4 ints -> 16 bytes
IntBuffer fb = BufferUtils.createIntBuffer(4);
// get the current color
GL11.glGetInteger(GL11.GL_CURRENT_COLOR,fb);
// the above gives an exception in BufferChecks, but that’s not true as the intbuffer size is enough to get the integers.