Loading engines/afalg/e_afalg.c +9 −5 Original line number Diff line number Diff line Loading @@ -230,11 +230,15 @@ int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf, memset(cb, '\0', sizeof(*cb)); cb->aio_fildes = sfd; cb->aio_lio_opcode = IOCB_CMD_PREAD; if (sizeof(buf) != sizeof(cb->aio_buf)) { /* * The pointer has to be converted to unsigned value first to avoid * sign extension on cast to 64 bit value * The pointer has to be converted to 32 bit unsigned value first * to avoid sign extension on cast to 64 bit value */ cb->aio_buf = (uint64_t)(unsigned long)buf; } else { cb->aio_buf = (uint64_t)buf; } cb->aio_offset = 0; cb->aio_data = 0; cb->aio_nbytes = len; Loading Loading
engines/afalg/e_afalg.c +9 −5 Original line number Diff line number Diff line Loading @@ -230,11 +230,15 @@ int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf, memset(cb, '\0', sizeof(*cb)); cb->aio_fildes = sfd; cb->aio_lio_opcode = IOCB_CMD_PREAD; if (sizeof(buf) != sizeof(cb->aio_buf)) { /* * The pointer has to be converted to unsigned value first to avoid * sign extension on cast to 64 bit value * The pointer has to be converted to 32 bit unsigned value first * to avoid sign extension on cast to 64 bit value */ cb->aio_buf = (uint64_t)(unsigned long)buf; } else { cb->aio_buf = (uint64_t)buf; } cb->aio_offset = 0; cb->aio_data = 0; cb->aio_nbytes = len; Loading