mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
Correctly handle array of odd length.
This commit is contained in:
parent
f854c0566e
commit
f21e0750a8
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,6 +21,7 @@
|
||||
void
|
||||
swab (const char *from, char *to, ssize_t n)
|
||||
{
|
||||
n &= ~((ssize_t) 1);
|
||||
while (n > 1)
|
||||
{
|
||||
const char b0 = from[--n], b1 = from[--n];
|
||||
|
Loading…
x
Reference in New Issue
Block a user