wrote:
> > > Just testing pgcrypto on freebsd/alpha. I get some warnings:
> > They should be harmless, although I should fix them.
>
> The actual code is:
>
> if ((dlen & 15) || (((unsigned) res) & 3))
> return -1;
> Hard to imagine how (uint *) & 3 makes any sense, unless res isn't
> always a (uint8 *). Is that true?
At some point it was casted to (uint32*) so I wanted to be sure its ok.
ATM its pointless. Please apply the following patch.
--
marko
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: internal.c,v 1.10 2001/11/20 18:54:07 momjian Exp $
+ * $Id: internal.c,v 1.11 2002/01/03 07:21:48 momjian Exp $
*/
if (dlen == 0)
return 0;
- if ((dlen & 15) || (((unsigned) res) & 3))
+ if (dlen & 15)
return -1;
memcpy(res, data, dlen);
if (dlen == 0)
return 0;
- if ((dlen & 15) || (((unsigned) res) & 3))
+ if (dlen & 15)
return -1;
memcpy(res, data, dlen);
if (dlen == 0)
return 0;
- if ((dlen & 7) || (((unsigned) res) & 3))
+ if (dlen & 7)
return -1;
memcpy(res, data, dlen);
if (dlen == 0)
return 0;
- if ((dlen & 7) || (((unsigned) res) & 3))
+ if (dlen & 7)
return -1;
memcpy(res, data, dlen);