<PAGE>

                                  EXHIBIT 10.3
                      CHANGE OF CONTROL AGREEMENT-H. SWIFT

THIS CHANGE OF CONTROL AGREEMENT (hereinafter "Agreement") is made as of the 1st
day of October, 1997, between PeoplesBank, A Codorus Valley Company, a
Pennsylvania banking institution (the "Bank"), Codorus Valley Bancorp, Inc., a
Pennsylvania business corporation (the "Corporation") and Harry R. Swift, an
adult individual (the "Executive").

WHEREAS, the Bank employs the Executive as General Counsel and Chief
Administrative Officer; and

WHEREAS, the Executive will provide valued services to the Bank and Corporation;
and

WHEREAS, in recognition of the services which the Executive will provide to the
Bank and the Corporation, the Bank and Corporation desire to provide some
measure of financial security to the Executive in the event of a Change of
Control (as defined herein); and

WHEREAS, the purpose of this Agreement is to define certain severance benefits
that will be paid by the Bank and the Corporation in the event of a Change of
Control (as defined herein). This Agreement is not intended to affect the terms
of the Executive's employment at will, in the absence of a Change of Control (as
defined herein) of the Bank and the Corporation. Accordingly, although this
Agreement will take effect upon Executive as a binding legal obligation of the
Bank and the Corporation, it will become operative only upon a Change in Control
of the Bank and the Corporation, as that concept is defined below.

NOW THEREFORE, in consideration of the Executive's service to the Corporation
and the Bank and of the mutual covenants, undertakings and agreements set forth
herein and intending to be legally bound hereby, the parties agree as follows:

     1. TERM. The initial term of this Agreement shall be for a period of
thirty-nine (39) months and shall be deemed to have commenced on October 1,
1997. Accordingly, the initial term shall continue until December 31, 2000. Each
term thereafter shall consist of a thirty-six (36) month period, which shall
begin on January 1, of each year. The renewal date of the initial term shall be
January 1, 1999 and January 1, shall be the renewal date each year thereafter.
On the initial renewal date of January 1, 1999 and on each subsequent renewal
date, this Agreement shall automatically renew for an additional one (1) year
period unless written notice of non-renewal is provided to the Executive by the
Corporation and/or the Bank, at least sixty (60) days prior to such renewal
date. For example: (1)if the Corporation and/or the Bank do not provide written
notice of non-renewal, at least sixty (60) days prior to the January 1, 1999
renewal date, the Agreement will be extended an additional one (1) year period,
until December 31, 2001; (2) if the Corporation and/or the Bank provide notice
to the Executive of non-renewal on November 1, 1998, which is at least sixty
days prior to January 1, 1999, the Agreement shall terminate on December 31,
2000; or (3) if the Corporation and/or the Bank provide notice to the Executive
of non-renewal on November 1, 2001, which is at least sixty days prior to
January 1, 2002, the Agreement shall terminate on December 31, 2003.

     2. DEFINITION OF CHANGE OF CONTROL. For purposes of this Agreement, the
term "Change of Control" shall mean: A change in control of a nature that would
be required to be reported in response to

                                       19

<PAGE>

Item 6(e) of Schedule 14A of Regulation 14A and any successor rule or regulation
promulgated under the Securities Exchange Act of 1934 (the "Exchange Act");
provided that, without limitation, such a change in control shall be deemed to
have occurred if (a) any "person" (as such term is used in Sections 13(d) and
14(d) of the Exchange Act), other than the Corporation or any "person" who on
the date hereof is a director or officer of the Corporation is or becomes the
"beneficial owner" (as defined in Rule 13d-3 under the Exchange Act), directly
or indirectly, of securities of the Corporation representing twenty-five percent
(25%) or more of the combined voting power of the Corporation's then outstanding
securities, or (b) during any period of two consecutive years during the term of
this Agreement, individuals who at the beginning of such period constitute the
Board of Directors of the Bank or Corporation cease for any reason to constitute
at least a majority thereof, unless the election of each director who was not a
director at the beginning of such period has been approved in advance by
directors representing at least two-thirds of the directors then in office who
were directors at the beginning of the period, or (c) the sale or transfer of
all or substantially all of the Bank or Corporation's assets.

     3. DEFINITION OF DATE OF CHANGE OF CONTROL. For purposes of this Agreement,
the date of Change of Control shall mean:

     (a) the first date on which a single person and/or entity, or group of
affiliated persons and/or entities, acquire the beneficial ownership of
twenty-five percent (25%) or more of the Corporation's voting securities, or

     (b) the date of the transfer of all or substantially all of the Bank or
Corporation's assets, or

     (c) the date on which a merger, consolidation or combination between the
Bank and the Corporation and a third party is consummated, as applicable, or

     (d) the date on which individuals who formerly constituted a majority of
the Board of Directors of the Bank or Corporation, ceased to be a majority.

     4. PAYMENTS UPON TERMINATION. If a Change of Control (as defined herein)
occurs, the Executive shall receive an amount equal to his current "Annual
Direct Salary" from the Date of the Change of Control as defined in paragraph 3
through the last day of the term of this Agreement. Annual Direct Salary shall
be defined herein as the fixed, gross, base annual salary paid to the Executive
in installments at such time as the Bank and Corporation customarily pays its
other senior officers and shall not include any benefits, bonuses, incentives or
other compensation. Provided, however, that in no event shall the Executive
receive an amount less than two (2) times his current Annual Direct Salary as of
the Date of the Change of Control as defined herein.

     5. UNAUTHORIZED DISCLOSURE. During the term of this Agreement, or at any
later time, the Executive shall not, without the written consent of the Board of
Directors of the Corporation or Bank or a person authorized thereby, knowingly
disclose to any person, other than an employee of the Corporation or Bank or a
person to whom disclosure is reasonably necessary or appropriate in connection
with the performance by the Executive of his duties as an executive of the
Corporation or Bank, any material confidential information obtained by him while
in the employ of the Corporation or Bank with respect to any of the Corporation
or Bank's services, products, improvements, formulas, designs or styles,
processes, customers, methods of business or any business practices the
disclosure of which could be or will be

                                       20

<PAGE>

materially damaging to the Corporation or Bank provided, however, that
confidential information shall not include any information known generally to
the public (other than as a result of unauthorized disclosure by the Executive
or any person with the assistance, consent or direction of the Executive) or any
information of a type not otherwise considered confidential by persons engaged
in the same business or a business similar to that conducted by the Corporation
or Bank or any information that must be disclosed as required by law.

     6. RESTRICTIVE COVENANT. The Executive covenants and agrees that the
Executive shall not directly or indirectly, within the marketing area of the
Bank (defined as an area within twenty-five (25) miles of the registered office
of the Bank), enter into or engage generally in direct or indirect competition
with the Corporation or Bank or any subsidiary of the Corporation, either as an
individual on his own or as a partner or joint venturer, or as a director,
officer, greater than five percent (5%) shareholder, employee, agent,
independent contractor, lessor or creditor of or for any person, for a period of
one (1) year after the date of termination of his employment if the Executive's
employment is terminated as a result of a Change of Control (as defined herein).
The existence of any claim or cause of action of the Executive against the
Corporation or Bank, whether predicated on this Agreement or otherwise, shall
not constitute a defense to the enforcement by the Corporation or Bank of this
covenant. The Executive agrees that any breach of the restrictions set forth in
this Agreement will result in irreparable injury to the Corporation or Bank for
which it shall have no adequate remedy at law and the Corporation or Bank shall
be entitled to injunctive relief in order to enforce the provisions hereof. In
the event that this paragraph shall be determined by any court of competent
jurisdiction to be unenforceable in part by reason of it being too great a
period of time or covering too great a geographical area, it shall be in full
force and effect as to that period of time or geographical area determined to be
reasonable by the court. The restriction set forth in this Agreement shall not
apply to the Executive in the event that he is terminated as a result of a
Change in Control (as defined herein), and is subsequently employed in the
private practice of law.

     7. DAMAGES FOR BREACH OF CONTRACT. In the event of a breach of this
Agreement by either the Corporation, Bank or the Executive resulting in damages
to another party to this Agreement, that party may recover from the party
breaching the Agreement only those damages as set forth herein. In no event
shall any party be entitled to the recovery of attorney's fees or costs.

     8. NOTICE. For the purposes of this Agreement, notices and all other
communications provided for in the Agreement shall be in writing and shall be
deemed to have been duly given when hand-delivered or mailed by United States
certified mail, return receipt requested, postage prepaid, addressed as follows:

If to the Executive:                H. Ronald Swift
                                    170 Sharon Drive
                                    York, PA 17403

If to the Bank:                     Larry J. Miller, President
                                    PeoplesBank, A Codorus Valley Company
                                    105 Leader Heights Road
                                    York, Pennsylvania 17403

If to the Corporation:              Larry J. Miller, President

                                       21

<PAGE>

                                    Codorus Valley Bancorp, Inc.
                                    105 Leader Heights Road
                                    York, Pennsylvania 17403

or to such other address as any party may have furnished to the other in writing
in accordance herewith, except that notices of change of address shall be
effective only upon receipt.

     9. SUCCESSORS. This Agreement shall inure to the benefit of and be binding
upon the Executive, the Corporation and the Bank and any of their successors or
assigns, provided however, that the Executive may not commute, anticipate,
encumber, dispose or assign any payment except as set forth in paragraph 12.

     10. SEVERABILITY. If any provision of this Agreement is declared
unenforceable for any reason, the remaining provisions of this Agreement shall
be unaffected thereby and shall remain in full force and effect.

     11. AMENDMENT. This Agreement may be amended or canceled only by mutual
agreement of the parties in writing.

     12. PAYMENT OF MONEY DUE DECEASED EXECUTIVE. In the event of Executive's
death, any moneys that may be due him from the Bank under this Agreement as of
the date of death shall be paid to the person designated by him in writing for
this purpose, or in the absence of any such designation to his estate.

     13. LAW GOVERNING. This Agreement shall be governed by and construed in
accordance with the laws of the Commonwealth of Pennsylvania.

     14. ENTIRE AGREEMENT. This Agreement supersedes any and all agreements,
either oral or in writing, between the parties with respect to compensation
resulting from a Change of Control (as defined herein), and this Agreement
contains all the covenants and agreements between the parties with respect to
compensation resulting from a Change of Control (as defined herein).

     IN WITNESS WHEREOF, the parties hereto, intending to be legally bound
hereby, have caused this Agreement to be duly executed in their respective names
and, in the case of the Corporation and Bank, by its authorized representatives
the day and year above mentioned.

ATTEST:                        PEOPLESBANK,
                               A CODORUS VALLEY COMPANY

/s/ Barbara J. Myers           By: /s/ Barry A. Keller
--------------------           ----------------------
Barbara J. Myers               Barry A. Keller
Secretary                      Chairman of the Board

ATTEST:                        CODORUS VALLEY BANCORP, INC.

                                       22

<PAGE>

/s/ Dallas L. Smith            By: /s/ George A. Trout
-------------------            ----------------------
Dallas L. Smith                Dr. George A. Trout
Secretary                      Chairman of the Board

WITNESS:

/s/ Carol L. Swift             /s/ Harry R. Swift
------------------             ------------------
Carol L. Swift                 Harry R. Swift

                                       23